How to solve equation using inverse matrix method?

784 Views Asked by At

I'm trying to solve the following equation:

$$ AX=B $$

where $A=\begin{bmatrix}1 & 5\\2 & 3\\-4 & 1\end{bmatrix}$, $B=\begin{bmatrix}1 & 2 & 5\\2 & 4 & 3\\-4 & -8 & -1\end{bmatrix}$

Usually I multiply both sides of the equation by $A^{-1}$ which results in $X=BA^{-1}$

However, matrix $A$ is not a square matrix so I cannot get its inverse. What I tried to do is multiply both sides of the equation by $B^{-1}$ and I get $AB^{-1}X=1$. But again I have no idea how to solve this.

Any tips on how to do this appreciated. Thx

2

There are 2 best solutions below

2
On

Let $$X = \left[\begin{array}{ccc}a&b&c\\d&e&f\end{array}\right] $$

Then it should hold

$$\begin{array}{lrcl} (1) & c+5f &=& 5 \\ (2) & 2c+3f&=&3 \\ (3) &-4c+f &=& -1 \end{array}$$

Then $(3)+2\cdot(2)$ reveals $$f = \frac{5}{7}$$ but $(3)+4\cdot(1)$ reveals that $$f=\frac{19}{21}$$ a contradiction. Thus you system has no solution.

0
On

You should get $X=A^{-1}B$ when you do what you say you do. But to answer your question, if $A'A$ is invertible then $X=(A'A)^{-1}A'B$ is the value of $X$ that minimizes the norm of $AX-B$ so if there is a solution then $X$ would be it. More generally, read up on Moore-Penrose inverses.