If I have a 4x4 matrix (consists of a lot of irrational numbers) and want to calculate the inverse, what is the easiest/fastest way? The calculator I am allowed to use (casio fx991 es plus) can handle matrices up to 3x3 (determinant, inverse, ...) I know that i could use gauss, but it could be very error prone if I do a mistake during calculation. An other approach is to calculate the inverse with the adjugate. Its a lot saver, as the calculator does the work but also very slow.
-
Calculating 17 determinants is "safer" than elimination? Wow! :) – Algebraic Pavel Nov 22 '14 at 13:13
-
If you have a lot of irrational numbers in it I think so? With the calculator I just type in the 3x3 matrix and get the determinant of it. – Sp0tlight Nov 22 '14 at 13:17
-
I'm sorry, I think that me and your matrix haven't met yet. – Algebraic Pavel Nov 22 '14 at 13:19
-
Sorry that was my fault, I should add this information to my original post. – Sp0tlight Nov 22 '14 at 13:24
-
1If your calculator can do all tedious work with $3\times 3$ matrices, you can probably use the block inversion. – Algebraic Pavel Nov 22 '14 at 13:27
2 Answers
One can do an "in-place" inversion of the $4\times 4$ matrix $A$ as a bordering of the $3\times 3$ submatrix in the upper left corner, if that submatrix is itself invertible. The general technique is described by In-place inversion of large matrices.
Suppose we have:
$$ A = \begin{bmatrix} B & u \\ v' & z \end{bmatrix} $$
where $B$ is the $3\times 3$ invertible submatrix, $u$ is a $3\times 1$ "column" block, $v'$ is a $1\times 3$ "row" block, and $z$ is a single entry in the lower right corner.
We have the following steps to compute:
(1) Invert $B$, overwriting it with $B^{-1}$:
$$ \begin{bmatrix} B^{-1} & u \\ v' & z \end{bmatrix} $$
(2) Multiply column $u$ by $B^{-1}$ and replace $u$ with the negation of that matrix-vector product:
$$ \begin{bmatrix} B^{-1} & -B^{-1}u \\ v' & z \end{bmatrix} $$
(3) Next, multiply the row $v'$ times the column result from the previous step, which gives a scalar, and add this to the lower right entry:
$$ \begin{bmatrix} B^{-1} & -B^{-1}u \\ v' & z - v'B^{-1}u \end{bmatrix} $$
(4) To keep the expressions simple, let's define $s = z - v'B^{-1}u$, so that is just the current lower right entry. Take its reciprocal:
$$ \begin{bmatrix} B^{-1} & -B^{-1}u \\ v' & s^{-1} \end{bmatrix} $$
(5) Multiply the row $v'$ on the right by $B^{-1}$:
$$ \begin{bmatrix} B^{-1} & -B^{-1}u \\ v'B^{-1} & s^{-1} \end{bmatrix} $$
(6) Multiply that row result by the negative scalar reciprocal $-s^{-1}$:
$$ \begin{bmatrix} B^{-1} & -B^{-1}u \\ -s^{-1}v'B^{-1} & s^{-1} \end{bmatrix} $$
(7) Construct a $3\times 3$ matrix (simple tensor) by multiplying the column $-B^{-1}u$ and the row $-s^{-1}v'B^{-1}$, adding this to the upper left corner submatrix:
$$ \begin{bmatrix} B^{-1} + B^{-1}u s^{-1}v'B^{-1} & -B^{-1}u \\ -s^{-1}v'B^{-1} & s^{-1} \end{bmatrix} $$
(8) The last step is an easy one, we simply multiply the upper right column entries $-B^{-1}u$ by $s^{-1}$:
$$ A^{-1} = \begin{bmatrix} B^{-1} + B^{-1}u s^{-1}v'B^{-1} & -s^{-1} B^{-1}u \\ -s^{-1}v'B^{-1} & s^{-1} \end{bmatrix} $$
I think your Gauss-Jordan Method is a pretty good way to go. No matter what you are going to have to do a lot of computations. And it is a good exercise to go through this on paper.
One other way that you might like is to use the adjugate matrix. You can read about this on this Wikipedia article. You can also find Youtube videos (a random on) that will explain this for you. You basically reduce that problem to computing a lot of determinants. But if your calculator can do $3\times 3$ matrices, then this might be the way to go since the determinants you need to compute will be of that size.
- 43,555