# inverse matrix search algorithm

For ex,

$$A^{-1}\cdot A=\left[\begin{matrix}x_1 & x_2\\x_3 & x_4\end{matrix}\right]\cdot\left[\begin{matrix}1 & 2\\1 & 3\end{matrix}\right]=\left[\begin{matrix}1 & 0\\0 & 1\end{matrix}\right]$$

and

$$A\cdot A^{-1}=\left[\begin{matrix}1 & 2\\1 & 3\end{matrix}\right]\cdot\left[\begin{matrix}x_1 & x_2\\x_3 & x_4\end{matrix}\right]=\left[\begin{matrix}1 & 0\\0 & 1\end{matrix}\right]$$

so we can make two systems:

$$\begin{equation*} \begin{cases} x_1 + 2x_3 = 1, \\ x_2 + 2x_4 = 0, \\ x_1 + 3 x_3 = 0, \\ x_2 + 3x_4 = 1 \end{cases} \end{equation*}$$

and

$$\begin{equation*} \begin{cases} x_1 + x_2 = 1, \\ 2x_1 + 3x_2 = 0, \\ x_3 + x_4 = 0, \\ 2 x_3 + 3x_4 = 1 \end{cases} \end{equation*}$$

after line addition we get the system:

$$\begin{equation*} \begin{cases} 2x_2 + 5x_4 = 1, \\ 2x_1 + 5x_3 = 1, \\ 3 x_1 + 4 x_2 = 1, \\ 3 x_3 + 4 x_4 = 1 \end{cases} \end{equation*}$$

We solve the system and find the roots: $$(x_1 = -2, x_2 = -2, x_3 = 1, x_4 = 1)$$. This is not the inverse matrix. What is obvious. The inverse matrix found by the standard algorithm is equal to

$$A^{-1}=\left[\begin{matrix}3 & -2\\-1 & 1\end{matrix}\right]$$

But where are my arguments wrong?

Edited correct roots of the last system are: $$x_1 - \frac{10x_4}{3} = \frac{-1}{3}, x_2 + 2.5x_4 = 0.5, x_3 + \frac{4x_4}{3} = \frac{1}{3}$$

• "line addition": what on earth is that? – Lord Shark the Unknown Jan 20 at 5:08
• @LordSharktheUnknown I just added the lines with the same variables in the systems ... – Just do it Jan 20 at 5:09
• What is the rank of your new system? – Lord Shark the Unknown Jan 20 at 5:10
• The coefficients of the actual inverse do satisfy your new system, so what's the problem? – Lord Shark the Unknown Jan 20 at 5:15
• @LordSharktheUnknown I think 3 because the last line is 0 – Just do it Jan 20 at 5:15

It is even easier that what you have done. Consider $$A^{-1}\cdot A=\left[\begin{matrix}x_1 & x_2\\x_3 & x_4\end{matrix}\right]\cdot\left[\begin{matrix}1 & 2\\1 & 3\end{matrix}\right]=\left[\begin{matrix}1 & 0\\0 & 1\end{matrix}\right]$$

You get your system: $$\begin{equation*} \begin{cases} x_1 + 2x_3 = 1, \\ x_2 + 2x_4 = 0, \\ x_1 + 3 x_3 = 0, \\ x_2 + 3x_4 = 1 \end{cases} \end{equation*}$$

Solve it, it is easy to see: $$(x_1,x_2,x_3,x_4)=(3,-2,-1,1)$$.

You can do the same in the other way. Consider $$A\cdot A^{-1}=\left[\begin{matrix}1 & 2\\1 & 3\end{matrix}\right]\cdot\left[\begin{matrix}x_1 & x_2\\x_3 & x_4\end{matrix}\right]=\left[\begin{matrix}1 & 0\\0 & 1\end{matrix}\right]$$

You get your system: $$\begin{equation*} \begin{cases} x_1 + x_2 = 1, \\ 2x_1 + 3x_2 = 0, \\ x_3 + x_4 = 0, \\ 2 x_3 + 3x_4 = 1 \end{cases} \end{equation*}$$

Solve it, it is easy to see: $$(x_1,x_2,x_3,x_4)=(3,-2,-1,1)$$.

Hence $$A^{-1}= \left[\begin{matrix}3 & -2\\-1 & 1\end{matrix}\right]$$

$$\begin{equation*} \begin{cases} x_1 + 2x_3 = 1, \\ x_2 + 2x_4 = 0, \\ x_1 + 3 x_3 = 0, \\ x_2 + 3x_4 = 1 \\ x_1 + x_2 = 1, \\ 2x_1 + 3x_2 = 0, \\ x_3 + x_4 = 0, \\ 2 x_3 + 3x_4 = 1 \end{cases} \end{equation*}$$