Matrix & Basic Operations
Elementary Matrices

Example 1.

We want to find inverse of the matrix

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

This means we want to find a matrix A^{ -1} such that

(2)   \begin{equation*}AA^{ -1} =A^{ -1}A =I \end{equation*}

We start reducing

(3)   \begin{equation*}\left (\begin{array}{cc} -1 & 1 \\ -2 & 1\end{array} \vdots \begin{array}{cc}1 & 0 \\ 0 & 1\end{array}\right ) \end{equation*}

multiply the first row by -1

(4)   \begin{equation*}\left (\begin{array}{cc}1 & -1 \\ -2 & 1\end{array} \vdots \begin{array}{cc} -1 & 0 \\ 0 & 1\end{array}\right ) \end{equation*}

Multiply the first row by 2 and add to the second row, replace the second row

(5)   \begin{equation*}\left (\begin{array}{cc}1 & -1 \\ 0 & -1\end{array} \vdots \begin{array}{cc} -1 & 0 \\ -2 & 1\end{array}\right ) \end{equation*}

Next, multiply the second row by -1

(6)   \begin{equation*}\left (\begin{array}{cc}1 & -1 \\ 0 & 1\end{array} \vdots \begin{array}{cc} -1 & 0 \\ 2 & -1\end{array}\right ) \end{equation*}

Now add the second row to the first row and replace the first row

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

Now we see that

(8)   \begin{equation*}A^{ -1} =\left (\begin{array}{cc}1 & -1 \\ 2 & -1\end{array}\right ) \end{equation*}

Let us check

(9)   \begin{equation*}A^{ -1}A =\left (\begin{array}{cc}1 & -1 \\ 2 & -1\end{array}\right )\left (\begin{array}{cc} -1 & 1 \\ -2 & 1\end{array}\right ) =\left (\begin{array}{cc}1 & 0 \\ 0 & 1\end{array}\right ) =I \end{equation*}

Observation 1.

Suppose we are given a linear system

(10)   \begin{align*} -x +y =4 \\ -2x +y =0\end{align*}

This system can be written as

(11)   \begin{equation*}\left (\begin{array}{cc} -1 & 1 \\ -2 & 1\end{array}\right )\left (\begin{array}{c}x \\ y\end{array}\right ) =\left (\begin{array}{c}4 \\ 0\end{array}\right )\begin{array}{c}\, \\ \,\end{array} \end{equation*}

Or in the form A\mathbf{x} =\mathbf{b} where A is the matrix of coefficients, \mathbf{x} is a variable column vector and

(12)   \begin{equation*}\mathbf{b} =\left (\begin{array}{c}4 \\ 0\end{array}\right ) \end{equation*}

This is said to be a matrix equation. We can also write the given system in the form

(13)   \begin{equation*}x\left (\begin{array}{c} -1 \\ -2\end{array}\right ) +y\left (\begin{array}{c}1 \\ 1\end{array}\right ) =\left (\begin{array}{c}4 \\ 0\end{array}\right ) \end{equation*}

We are in fact writing the vector \mathbf{b} as a linear combination of columns of A. As you see, any matrix equation A\mathbf{x} =\mathbf{b} is consistent if and only if the vector \mathbf{b} can be written as a linear combination of columns of A.

Observation 2.

Suppose we are given the matrix equation in observation 1. If we find a matrix A^{ -1} such that A^{ -1}A =I that is

(14)   \begin{equation*}A^{ -1}A =\left (\begin{array}{cc}1 & 0 \\ 0 & 1\end{array}\right ) \end{equation*}

then we could multiply both sides of the equation A\mathbf{x} =\mathbf{b} by A^{ -1} and get

(15)   \begin{align*}A^{ -1}A\mathbf{x} =A^{ -1}\mathbf{b} \\ \mathbf{x} =A^{ -1}\mathbf{b}\end{align*}

This way we are able to solve for \mathbf{x} =\left (\begin{array}{c}x \\ y\end{array}\right ). From example 1, we know

(16)   \begin{equation*}A^{ -1} =\left (\begin{array}{cc}1 & -1 \\ 2 & -1\end{array}\right ) \end{equation*}

Therefore

(17)   \begin{align*}\mathbf{x} =A^{ -1}\mathbf{b} \\ =\left (\begin{array}{cc}1 & -1 \\ 2 & -1\end{array}\right )\left (\begin{array}{c}4 \\ 0\end{array}\right ) \\ =\left (\begin{array}{c}4 \\ 8\end{array}\right )\end{align*}

Therefore x =4 and y =8.

Example 2.

We want to solve the system

(18)   \begin{align*}x +y -2z = -1 \\ x -2x +z =2 \\ y +z -x =0\end{align*}

The associated matrix equation is

(19)   \begin{align*}A\mathbf{x} =\mathbf{b} \\ \left (\begin{array}{ccc}1 & 1 & -2 \\ 1 & -2 & 1 \\ -1 & 1 & 1\end{array}\right )\left (\begin{array}{c}x \\ y \\ z\end{array}\right ) =\left (\begin{array}{c} -1 \\ 2 \\ 0\end{array}\right )\end{align*}

We know

(20)   \begin{equation*}\mathbf{x} =A^{ -1}\mathbf{b} \end{equation*}

Therefore, first we find A^{ -1}

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

The first row has a leading 1 so we move to the second row. Subtract first row from second, replace second

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

Next, multiply the second row with -\frac{1}{3}

(23)   \begin{equation*}\left (\begin{array}{ccc}1 & 1 & -2 \\ 0 & 1 & -1 \\ -1 & 1 & 1\end{array} \vdots \begin{array}{ccc}1 & 0 & 0 \\ \frac{1}{3} & -\frac{1}{3} & 0 \\ 0 & 0 & 1\end{array}\right ) \end{equation*}

Now we have a leading 1 in the second row. Move on to the third row. Add first and third row, replace the third row

(24)   \begin{equation*}\left (\begin{array}{ccc}1 & 1 & -2 \\ 0 & 1 & -1 \\ 0 & 2 & -1\end{array} \vdots \begin{array}{ccc}1 & 0 & 0 \\ \frac{1}{3} & -\frac{1}{3} & 0 \\ 1 & 0 & 1\end{array}\right ) \end{equation*}

Multiply the second row by -2 and add to the third row, replace the third row

(25)   \begin{equation*}\left (\begin{array}{ccc}1 & 1 & -2 \\ 0 & 1 & -1 \\ 0 & 0 & 1\end{array} \vdots \begin{array}{ccc}1 & 0 & 0 \\ \frac{1}{3} & -\frac{1}{3} & 0 \\ \frac{1}{3} & \frac{2}{3} & 1\end{array}\right ) \end{equation*}

Next, Add the third row to the second row and replace the second row

(26)   \begin{equation*}\left (\begin{array}{ccc}1 & 1 & -2 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array} \vdots \begin{array}{ccc}1 & 0 & 0 \\ \frac{2}{3} & \frac{1}{3} & 1 \\ \frac{1}{3} & \frac{2}{3} & 1\end{array}\right ) \end{equation*}

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

(27)   \begin{equation*}\left (\begin{array}{ccc}1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array} \vdots \begin{array} {ccc} \frac{5}{3} & \frac{4}{3} & 2 \\ \frac{2}{3} & \frac{1}{3} & 1 \\ \frac{1}{3} & \frac{2}{3} & 1\end{array}\right ) \end{equation*}

The only nonzero left other than diagonal element is the index 1 ,2. Subtract the second row from the first and replace the first one

(28)   \begin{equation*}\left (\begin{array}{ccc}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array} \vdots \begin{array}{ccc}1 & 1 & 1 \\ \frac{2}{3} & \frac{1}{3} & 1 \\ \frac{1}{3} & \frac{2}{3} & 1\end{array}\right ) \end{equation*}

Now we check to see if the obtained matrix is in fact the inverse of A

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

Now we can compute

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

Therefore x =1 ,y =0 ,z =1.

Leave a Reply