Matrix Inverse
Determinants

Example 1.

Suppose we want to find a sequence of elementary matrices that can be used to write

(1)   \begin{equation*}A =\left (\begin{array}{ccc}0 & 1 & 7 \\ 5 & 10 & -5\end{array}\right ) \end{equation*}

in row-echelon form. We know an n by n matrix is elementary if it can be obtained by applying exactly one elementary row operation to the n by n identity matrix that is interchanging two rows, multiplying a row by constant or multiplying a row by a constant and adding to another row. Next we can multiply the matrix A on the left with each elementary matrix to apply the desired row operation to A. To start we want to interchange row 1 and 2 so take

(2)   \begin{equation*}E_{1} =\left (\begin{array}{cc}0 & 1 \\ 1 & 0\end{array}\right ) \end{equation*}

and write

(3)   \begin{align*}E_{1}A =\left (\begin{array}{cc}0 & 1 \\ 1 & 0\end{array}\right )\left (\begin{array}{ccc}0 & 1 & 7 \\ 5 & 10 & -5\end{array}\right ) \\ =\left (\begin{array}{ccc}5 & 10 & -5 \\ 0 & 1 & 7\end{array}\right )\end{align*}

 

Next, we want to have the leading 1 in the first row, so take

(4)   \begin{equation*}E_{2} =\left (\begin{array}{cc}\frac{1}{5} & 0 \\ 0 & 1\end{array}\right ) \end{equation*}

and write

(5)   \begin{align*}E_{2}E_{1}A =\left (\begin{array}{cc}\frac{1}{5} & 0 \\ 0 & 1\end{array}\right )\left (\begin{array}{ccc}5 & 10 & -5 \\ 0 & 1 & 7\end{array}\right ) \\ =\left (\begin{array}{ccc}1 & 2 & -1 \\ 0 & 1 & 7\end{array}\right )\end{align*}

and therefore we have A in row-echelon form.

 

Example 2.

Suppose we want to find inverse of the matrix

(6)   \begin{equation*}A =\left (\begin{array}{ccc}1 & -2 & 0 \\ -1 & 3 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

using elementary matrices. We start by writing each row operation. First, we have a leading 1 in the first row so add first and second row and replace the second row

(7)   \begin{equation*}\left (\begin{array}{ccc}1 & -2 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

The elementary matrix associated to this step is

(8)   \begin{equation*}E_{1} =\left (\begin{array}{ccc}1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

Next, multiply the second row by 2 and add to the first row

(9)   \begin{equation*}\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

The elementary matrix associated to this step is

(10)   \begin{equation*}E_{2} =\left (\begin{array}{ccc}1 & 2 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

Now we see that

(11)   \begin{equation*}E_{2}E_{1}A =I \end{equation*}

Therefore

(12)   \begin{equation*}E_{2}E_{1} =A^{ -1} \end{equation*}

that is

(13)   \begin{equation*}A^{ -1} =\left (\begin{array}{ccc}1 & 2 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) =\left (\begin{array}{ccc}3 & 2 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

Now we check

(14)   \begin{align*}A^{ -1}A =\left (\begin{array}{ccc}3 & 2 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & -2 & 0 \\ -1 & 3 & 0 \\ 0 & 0 & 1\end{array}\right ) \\ =\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\end{align*}

 

Example 3.

Suppose, if possible, we want to write the matrix

(15)   \begin{equation*}A =\left (\begin{array}{ccc}3 & 0 & 1 \\ 6 & 1 & 1 \\ -3 & 1 & 0\end{array}\right ) \end{equation*}

as a multiplication of a lower triangle matrix L and upper triangle matrix U that is A =LU . Start by using elementary matrices to put A in row-echelon form

(16)   \begin{equation*}E_{1} =\left (\begin{array}{ccc}\frac{1}{3} & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

(17)   \begin{equation*}E_{1}A =\left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 6 & 1 & 1 \\ -3 & 1 & 0\end{array}\right ) \end{equation*}

Next,

(18)   \begin{equation*}E_{2} =\left (\begin{array}{ccc}1 & 0 & 0 \\ -6 & 1 & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

(19)   \begin{equation*}E_{2}E_{1}A =\left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 0 & 1 & -1 \\ -3 & 1 & 0\end{array}\right ) \end{equation*}

Next,

(20)   \begin{equation*}E_{3} =\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 3 & 0 & 1\end{array}\right ) \end{equation*}

(21)   \begin{equation*}E_{3}E_{2}E_{1}A =\left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 0 & 1 & -1 \\ 0 & 1 & 1\end{array}\right ) \end{equation*}

Next,

(22)   \begin{equation*}E_{4} =\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & -1\end{array}\right ) \end{equation*}

(23)   \begin{equation*}E_{4}E_{3}E_{2}E_{1}A =\left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 0 & 1 & -1 \\ 0 & 0 & -2\end{array}\right ) =U \end{equation*}

Now, observe that each elementary matrix is invertible and we can write

(24)   \begin{align*}L^{ -1} =E_{4}E_{3}E_{2}E_{1} \\ L =E_{1}^{ -1}E_{2}^{ -1}E_{3}^{ -1}E_{4}^{ -1} \\ =\left (\begin{array}{ccc}3 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 6 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ -3 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & -1\end{array}\right )\end{align*}

Now we get

 

(25)   \begin{align*}\begin{array}{c}L =\left (\begin{array}{ccc}3 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 6 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ -3 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & -1\end{array}\right ) \\ =\left (\begin{array}{ccc}3 & 0 & 0 \\ 6 & 1 & 0 \\ 0 & 0 & 1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ -3 & 1 & -1\end{array}\right ) \\ =\left (\begin{array}{ccc}3 & 0 & 0 \\ 6 & 1 & 0 \\ -3 & 1 & -1\end{array}\right )\end{array}\end{align*}

 

Now we check the LU factorization

(26)   \begin{align*}LU =\left (\begin{array}{ccc}3 & 0 & 0 \\ 6 & 1 & 0 \\ -3 & 1 & -1\end{array}\right )\left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 0 & 1 & -1 \\ 0 & 0 & -2\end{array}\right ) \\ =\left (\begin{array}{ccc}3 & 0 & 1 \\ 6 & 1 & 1 \\ -3 & 1 & 0\end{array}\right )\end{align*}

 

Example 4.

Suppose we are given the system

(27)   \begin{align*}3x +z =1 \\ 6x +y +z =2 \\ y -3x =3\end{align*}

and we would like to use LU-factorization to solve this system. First note that we can write this system as

(28)   \begin{equation*}\left (\begin{array}{ccc}3 & 0 & 1 \\ 6 & 1 & 1 \\ -3 & 1 & 0\end{array}\right )\left (\begin{array}{c}x \\ y \\ z\end{array}\right ) =\left (\begin{array}{c}1 \\ 2 \\ 3\end{array}\right ) \end{equation*}

that is

(29)   \begin{equation*}A\mathbf{x} =\mathbf{b} \end{equation*}

where

(30)   \begin{equation*}A =\left (\begin{array}{ccc}3 & 0 & 1 \\ 6 & 1 & 1 \\ -3 & 1 & 0\end{array}\right ) ,\mathbf{x} =\left (\begin{array}{c}x \\ y \\ z\end{array}\right ) ,\mathbf{b} =\left (\begin{array}{c}1 \\ 2 \\ 3\end{array}\right ) \end{equation*}

 

Please observe that when we can write

(31)   \begin{equation*}A =LU \end{equation*}

then

(32)   \begin{equation*}LU\mathbf{x} =\mathbf{b} \end{equation*}

This gives us a hint. Define

(33)   \begin{equation*}\mathbf{y} =U\mathbf{x} \end{equation*}

and so solve the system

(34)   \begin{equation*}L\mathbf{y} =\mathbf{b} \end{equation*}

that is

(35)   \begin{equation*}\mathbf{y} =L^{ -1}\mathbf{b} \end{equation*}

After this,

(36)   \begin{equation*}U\mathbf{x} =\mathbf{y} \end{equation*}

can be solved for \mathbf{x}. Let’s try it. From example 3, we know

(37)   \begin{equation*}L =\left (\begin{array}{ccc}3 & 0 & 0 \\ 6 & 1 & 0 \\ -3 & 1 & -1\end{array}\right ) ,U =\left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 0 & 1 & -1 \\ 0 & 0 & -2\end{array}\right ) \end{equation*}

We write

(38)   \begin{align*}\mathbf{y} =L^{ -1}\mathbf{b} \\ =\left (\begin{array}{ccc}\frac{1}{3} & 0 & 0 \\ -2 & 1 & 0 \\ -3 & 1 & -1\end{array}\right )\left (\begin{array}{c}1 \\ 2 \\ 3\end{array}\right ) \\ =\left (\begin{array}{c}\frac{1}{3} \\ 0 \\ -4\end{array}\right )\end{align*}

Now solve

(39)   \begin{align*}U\mathbf{x} =\mathbf{y} \\ \left (\begin{array}{ccc}1 & 0 & \frac{1}{3} \\ 0 & 1 & -1 \\ 0 & 0 & -2\end{array}\right )\left (\begin{array}{c}x \\ y \\ z\end{array}\right ) =\left (\begin{array}{c}\frac{1}{3} \\ 0 \\ -4\end{array}\right )\end{align*}

This provides

(40)   \begin{align*}z =2 \\ y =2 \\ x = -\frac{14}{3}\end{align*}

Leave a Reply