Help with simple matrix algebra

Click For Summary
SUMMARY

The discussion centers on solving the matrix equation s = r * H, where s is a 1x3 vector and H is a 3x6 matrix. The user encountered difficulties in MATLAB due to the non-square nature of matrix H, which prevents direct inversion. The solution involves using the Moore-Penrose Pseudoinverse, defined as A† = (A^TA)⁻¹A^T, applicable when A is full-rank. The user was reminded that for the equation to hold, the dimensions of r must be adjusted to ensure compatibility with the dimensions of s and H.

PREREQUISITES
  • Understanding of matrix algebra and dimensions
  • Familiarity with MATLAB for matrix operations
  • Knowledge of the Moore-Penrose Pseudoinverse
  • Concept of full-rank matrices
NEXT STEPS
  • Learn how to compute the Moore-Penrose Pseudoinverse in MATLAB
  • Study the properties of full-rank matrices and their implications
  • Explore Singular Value Decomposition (SVD) for matrix factorization
  • Practice solving matrix equations with varying dimensions
USEFUL FOR

Students and professionals in mathematics, engineering, or data science who are working with matrix algebra and require assistance in solving matrix equations using MATLAB.

rusty009
Messages
68
Reaction score
0
Hi all,

I'm having trouble solving this matrix problem, basically I have,

s=r*H

where s = [ 1 1 0] and,

H=
1 0 1 1 0 0
0 1 1 0 1 0
1 1 0 0 0 1

I am trying to find out what the matrix r is but it won't work in matlab. I have tried inverting H but it isn't a square matrix. So I tried pseudoinverse psinv and it still doesn't seem to be working. Any help would be greatly appreciated.
 
Physics news on Phys.org
Your problem is that this is impossible. H has three rows and 6 columns so r must have three columns. If it also has n rows, s would have to have n rows and 6 columns. Since s has one row, n can be 1 but s has 3 columns, not 6.
 
Your equation is of the form :
<br /> \vec{a} = \vec{b}A<br />

Where b is the 1x3 vector we are looking for and a is a 1x6 vector . As you mentioned, your matrix isn't square an thus not normally invertible. By the Moore-Penrose Pseudoinverse, there does exist a solution (infinitely many actually).
Your matrix A is an mxn matrix where m<n and is also full-rank, so:
<br /> A^\dagger = (A^TA)^{-1}A^T<br />
Where A-dagger is the Moore-Penrose Pseudoinverse. Notice that only because A was full rank could you use this formula, otherwise you have to use the singular value decomposition .
I've tried A^\dagger = (A^TA)^{-1}A^T with your matrix but A^TA turns out to be singular. I suppose you could try to take the pseudoinverse of that too, but then I'm not sure if everything will work out as you had wanted.

Edit: I made a silly mistake with the size of r :redface: (as HallsofIvy pointed out). The above would have been useful for consistent sizes and a full rank matrix.
 
Last edited:

Similar threads

  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K