Why Does Inverting Matrix A Fail to Solve the Equation?

  • Thread starter Thread starter jacky_pcs
  • Start date Start date
AI Thread Summary
Inverting matrix A fails to solve the equation x = a - 1*b because the dimensions of the matrices involved are incompatible. Matrix A is 35x20, while matrix B is 35x1, making the multiplication invalid when attempting to apply the inverse. The correct approach for a least squares problem is x = (A^T*A)^-1*A^T*b. The discussion highlights the importance of ensuring matrix dimensions align for valid operations. Understanding these matrix properties is crucial for solving such equations effectively.
jacky_pcs
Messages
2
Reaction score
0
I would like to solve equation with x=a-1*b but when I inverse matrix A . It is bad solution to solve (I use mathematica to solve it)(Attach matrix A in excel file).
I want to know why matrix A is bad solution when I inverse??
If I want to solve this equation. How i can do?
 

Attachments

Last edited:
Physics news on Phys.org
Is your matrix a square? If not - no inverse. (Although being square is not itself sufficient for an inverse to exist.)
 
-I use Pseudo method but answer is bad solution
x=(aT*a)-1*B
 
Okay, for which item are you trying to solve.

your equation was
<br /> x = a - 1b<br />

That has nothing to do at all with your "solution" - your result doesn't follow from the equation.
 
Roger Penrose worked on the inverses on non-square matries before relativity.
 
statdad said:
Okay, for which item are you trying to solve.

your equation was
<br /> x = a - 1b<br />

That has nothing to do at all with your "solution" - your result doesn't follow from the equation.

I believe the OP meant x = A-1b.

Then he/she revised the above to this: x=(aT*a)-1*B,
which I believe means this: x = (ATA)-1b.
 
Mark44 said:
I believe the OP meant x = A-1b.

Then he/she revised the above to this: x=(aT*a)-1*B,
which I believe means this: x = (ATA)-1b.

Aha - good catch. Of course, this means that the original equation is nowhere to be seen, so it remains impossible to see why this approach fails.
 
Need to pay attention to dimension. The matrix A has 35 rows and 20 columns (i.e. 35 x 20) and B has 35 rows (i.e. 35 x 1). ATA is a 20 x 20 matrix and so is (ATA)-1. Multiplying a 35 x 1 matrix by a 20 x 20 matrix isn't valid.

This smells like a least squares problem, which means the solution would be x = (ATA)-1 ATb.
 
hunt_mat said:
Roger Penrose worked on the inverses on non-square matries before relativity.
What in the world do you mean by this? Roger Penrose wasn't born until 26 years after relativity was developed! Do you mean he worked on them before they were used in relativity?
 
  • #10
HallsofIvy said:
What in the world do you mean by this? Roger Penrose wasn't born until 26 years after relativity was developed! Do you mean he worked on them before they were used in relativity?

Penrose worked those inverses before he worked on relativity
 
Back
Top