Question on Cramer’s rule

linear algebra

I used to think that solving linear systems using the Cramer's rule is easy. However I got confused.

Consider a simple equation system

$$\underbrace{\left( \begin{matrix}
a & b & 0 & 0 \\
c & d & 0 & e \\
0 & 0 & h & i \\
1 & 0 & -1 & 0 \\ \end{matrix}\right)}_{A}
\cdot
\left( \begin{array}{rrr}
x_1 \\
x_2 \\
x_3 \\
x_4
\end{array}\right) =
\left( \begin{array}{rrr}
y_1 \\
0 \\
0 \\
0
\end{array}\right)
$$

Solving this using Cramer, I get

$$x_2 = \frac{\det(A_{x_2})}{\det(A)}= \frac{y_1 c i }{b c i } = \frac{y_1 }{b }.$$

So far so good. However, based on the last line it is obvious that the equation system can be simplified by using $x_1 = x_3$ to:

$$\underbrace{\left( \begin{matrix}
b & a & 0 \\
d & c & e \\
0 & h & i \\
\end{matrix}\right)}_{B}
\cdot
\left( \begin{array}{rrr}
x_2 \\
x_3 \\
x_4
\end{array}\right) =
\left( \begin{array}{rrr}
y_1 \\
0 \\
0
\end{array}\right)
$$

When I solve this to $x_2$, i get suprisingly a different result:
$$
x_2 = \frac{\det(B_{x_2})}{\det(B)}= \frac{y_1 c i – y_1 h e}{b c i – a d i } .$$

What is going on here?

Best Answer

I suspect that you are applying the Rule_of_Sarrus to a matrix of order $4\times 4$. Such rule holds just for matrices $3\times 3$. The first evaluation of $x_2$ should be $$x_2 = \frac{\det(A_{x_2})}{\det(A)}= \frac{-y_1 (ci-he) }{adi-bci+beh}.$$ As regards the second evaluation we have that $$\underbrace{\left( \begin{matrix} b & a & 0 \\ d & c & e \\ 0 & h & i \\ \end{matrix}\right)}_{B} \cdot \left( \begin{array}{rrr} x_2 \\ x_3 \\ x_4 \end{array}\right) = \left( \begin{array}{rrr} y_1 \\ 0 \\ 0 \end{array}\right)$$ implies $$x_2 = \frac{\det(B_{x_2})}{\det(B)}= \frac{y_1 (ci-he) }{b c i - heb -ida} $$ which is equal to the first one.

Related Question