0
$\begingroup$

I have this confusion related to matrix inverse. Lets say I have this equation

$AX=B$,

Then is it $X=A^{-1}B$ or $X=BA^{-1}$.

When I say A/B is it $A^{-1}B$ or $BA^{-1}$.

3 Answers 3

4

Matrix multiplication is not in general commutative, so you have to pay attention to the order of the factors when you multiply. To solve the equation $AX=B$, you want to get rid of the $A$ by multiplying it by its inverse, so you have to multiply on the left: $A^{-1}(AX)=(A^{-1}A)X=IX=X$. As usual, you must do exactly the same thing to the other side of the equation, so you end up with $X=A^{-1}B$, not $X=BA^{-1}$.

You should not say $B/A$ at all: division of matrices is undefined, so that combination of symbols is meaningless.

1

You multiply by $A^{-1}$ to cancel the $A$. So, to cancel $A$ from $AX$, you need to multiply by $A^{-1}$ on the left side...

Your solution is basically the following:

$AX=B \Rightarrow A^{-1}AX=A^{-1}B \Rightarrow X= A^{-1}B $

Similarly, if you solve $XA=B$, to cancel $A$ you need to multiply to the right, thus in that case, $X=BA^{-1}$.

  • 0
    @All Actually I am confused how the matlab does the work. If I have matri$x$ A of size 3x4 and matrix B of size 4x4, if I do A/B it gives me a resultant matrix of size 3x4. If I do B/A it gives me a resultant matrix of size 4x3. I am not sure what matlab does and what equation it solves behind?2012-10-11
0

In Matlab, if your matrix is not square and you ask it to do division with it, it uses the least squares solution. That solution matrix will be of dimension of the transpose. So for example if your matrix is 4x3, dividing gives a 3x4 matrix.

  • 0
    A 3x4 matrix might have a *right* inverse which is what the least squares would be when using the unique one (has same column span as A's row span). I am talking A/A in Matlab. I am not sure what Matlab would do in the 4x3 case, though it may just use the same matrix since it is conformable and has conformable span (see the four fundamental matrix spaces).2012-10-11