How do you find the inverse of #A=##((1, 1, 1, 0), (1, 1, 0, -1), (0, 1, 0, 1), (0, 1, 1, 0))#?
1 Answer
Explanation:
You can compute the inverse by writing the identity matrix
#( (1, 1, 1, 0, |, 1, 0, 0, 0), (1, 1, 0, -1, |, 0, 1, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 1, 1, 0, |, 0, 0, 0, 1) )#
Afterwards you need to perform transformations (adding rows, multiplying rows with a scalar number or swapping two rows) to transform the matrix at the left side to the identity matrix.
If you perform exactly the same operations at the right side, you will gain the inverse matrix
#(A | I ) -> (I | A^(-1))#
Let me show you how to do it in this case:
#( (1, 1, 1, 0, |, 1, 0, 0, 0), (1, 1, 0, -1, |, 0, 1, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 1, 1, 0, |, 0, 0, 0, 1) )#
It is already nice that you have a
Eliminate the
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (color(blue)(0), color(blue)(0), color(blue)(-1), color(blue)(-1), |, color(blue)(-1), color(blue)(1), color(blue)(0), color(blue)(0)), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 1, 1, 0, |, 0, 0, 0, 1) )#
The first column is already finished. Let's concentrate on the second:
Swap the rows
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 0, -1, -1, |, -1, 1, 0, 0), (0, 1, 1, 0, |, 0, 0, 0, 1) )#
Eliminate the
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 0, -1, -1, |, -1, 1, 0, 0), (color(orange)(0),color(orange)(0), color(orange)(1), color(orange)(-1), |, color(orange)(0), color(orange)(0), color(orange)(-1), color(orange)(1)) )#
Swap the rows
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 0, 1, -1, |, 0, 0, -1, 1), (0, 0, -1, -1, |, -1, 1, 0, 0) )#
Eliminate the
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 0, 1, -1, |, 0, 0, -1, 1), (0, 0, 0, -2, |, -1, 1, -1, 1) )#
Generate a
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (0, 0, 1, -1, |, 0, 0, -1, 1), (color(red)(0), color(red)(0), color(red)(0), color(red)(1), |, color(red)(1/2), color(red)(-1/2), color(red)(1/2), color(red)(-1/2)) )#
Now, the diagonal of the left matrix and all the elements below the diagonal are ready.
The next step would be eliminating all the non-zero values above the diagonal.
Eliminate the
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (0, 1, 0, 1, |, 0, 0, 1, 0), (color(violet)(0), color(violet)(0), color(violet)(1), color(violet)(0), |, color(violet)(1/2), color(violet)(-1/2), color(violet)(-1/2), color(violet)(1/2)), (0, 0, 0, 1, |, 1/2, -1/2, 1/2, -1/2) )#
Eliminate the
#=> ( (1, 1, 1, 0, |, 1, 0, 0, 0), (color(green)(0), color(green)(1), color(green)(0), color(green)(0), |, color(green)(-1/2), color(green)(1/2), color(green)(1/2), color(green)(1/2)), (0, 0, 1, 0, |, 1/2, -1/2, -1/2, 1/2), (0, 0, 0, 1, |, 1/2, -1/2, 1/2, -1/2) )#
Eliminate the
#=> ( (color(turquoise)(1), color(turquoise)(1), color(turquoise)(0), color(turquoise)(0), |, color(turquoise)(1/2), color(turquoise)(1/2), color(turquoise)(1/2), color(turquoise)(-1/2)), (0, 1, 0, 0, |, -1/2, 1/2, 1/2, 1/2), (0, 0, 1, 0, |, 1/2, -1/2, -1/2, 1/2), (0, 0, 0, 1, |, 1/2, -1/2, 1/2, -1/2) )#
And the last step: eliminate the
#=> ( (color(brown)(1), color(brown)(0), color(brown)(0), color(brown)(0), |, color(brown)(1), color(brown)(0), color(brown)(0), color(brown)(-1)), (0, 1, 0, 0, |, -1/2, 1/2, 1/2, 1/2), (0, 0, 1, 0, |, 1/2, -1/2, -1/2, 1/2), (0, 0, 0, 1, |, 1/2, -1/2, 1/2, -1/2) )#
Thus, your inverse matrix is
# A^(-1) = ( (1, 0, 0, -1), (-1/2, 1/2, 1/2, 1/2), (1/2, -1/2, -1/2, 1/2), (1/2, -1/2, 1/2, -1/2) )#
You can check if the computation was correct by computing