Cramer's rule

It is complicated to solve a system of linear equations, although we have some methods to tackle these problems.

The Gaussian method is one of them, but now we will study the rule or method of Cramer.

This rule can only be used if the system of equations to be solved satisfies two conditions:

1. The system has as many equations as unknowns.
2. The determinant of the matrix of the coefficients is not zero.

We will now see the procedure that one must follow to use Cramer's rule. Let's take a system that satisfies the two necessary conditions: $$\left\{ \begin{array}{c} x+y+z=1 \\ x-2y+3z=2 \\ x-z=5 \end{array} \right.$$$The first thing will be to re-write the system by means of the matrix of the coefficients and to calculate its determinant to make sure that it is not zero: $$\begin{pmatrix} 1 & 1 & 1 \\ 1 & -2 & 3 \\ 1 & 0 & 1\end{pmatrix}$$$ And the determinant is $$\Delta=\left| \begin{matrix} 1 & 1 & 1\\ 1 & -2 & 3 \\ 1 & 0 & 1 \end{matrix} \right|=2$$$(real and different from zero). We define now the determinants $$\Delta_i$$ that are the result of changing the column $$i$$ of the coefficients matrix with the column of constant terms. Let's calculate these determinants: $$\Delta_1=\left| \begin{matrix} 1 & 1 & 1\\ 2 & -2 & 3 \\ 5 & 0 & 1 \end{matrix} \right|=21, \ \$$ $$\Delta_2=\left| \begin{matrix} 1 & 1 & 1\\ 1 & 2 & 3 \\ 1 & 5 & 1 \end{matrix} \right|=8, \ \$$ $$\Delta_3=\left| \begin{matrix} 1 & 1 & 1\\ 1 & -2 & 2 \\ 1 & 0 & 5 \end{matrix} \right|=-11$$ Cramer's rule says that the solution of the system of equations is $$x_i=\dfrac{\Delta_i}{\Delta}$$. In this case, then, $$x_1=\dfrac{21}{2}$$, $$x_2=\dfrac{-8}{2}$$, $$x_3=\dfrac{-11}{2}$$. After the first example we will now set up the general steps for any system of equations. $$\left\{ \begin{array}{c} a_{11}x_1+a_{12}x_2+a_{13}x_3+\ldots+a_{1n}x_n=b_1 \\ a_{21}x_1+a_{22}x_2+a_{23}x_3+\ldots+a_{2n}x_n=b_2 \\ a_{31}x_1+a_{32}x_2+a_{33}x_3+\ldots+a_{3n}x_n=b_3 \\ \ldots\ldots\ldots\ldots\ldots\ldots\ldots\ldots \\ a_{m1}x_1+a_{m2}x_2+a_{m3}x_3+\ldots+a_{mn}x_n=b_m \end{array} \right.$$$

1) Verify that the system satisfies the two conditions: equal number of unknowns and equations $$(n=m)$$ and a nonzero determinant of the matrix of the coefficients $$(\Delta\neq0)$$

2) Compute the determinant of the matrix of coefficients $$\Delta=\left| \begin{matrix} a_{11} & a_{12} & \ldots & a_{1n} \\ a_{21} & a_{22} &\ldots & a_{2n} \\ \ldots & \ldots & \ldots & \ldots \\ a_{m1} & a_{m2} & \ldots & a_{mm} \end{matrix} \right|$$$3) The determinants $$\Delta_i$$ are calculated by replacing the column $$i$$ by the column of the constant terms: $$\Delta_1=\left| \begin{matrix} b_1 & a_{12} & \ldots & a_{1n} \\ b_2 & a_{22} &\ldots & a_{2n} \\ \ldots & \ldots & \ldots & \ldots \\ b_m & a_{m2} & \ldots & a_{mm} \end{matrix} \right| \ \$$, $$\Delta_2=\left| \begin{matrix} a_{11} & b_1 & \ldots & a_{1n} \\ a_{21} & b_2 &\ldots & a_{2n} \\ \ldots & \ldots & \ldots & \ldots \\ a_{m1} & b_m & \ldots & a_{mm} \end{matrix} \right| \ \$$, $$\ldots$$, $$\Delta_n=\left| \begin{matrix} a_{11} & a_{12} & \ldots & b_1 \\ a_{21} & a_{22} &\ldots & b_2 \\ \ldots & \ldots & \ldots & \ldots \\ a_{m1} & a_{m2} & \ldots & b_m \end{matrix} \right|$$ 4) The solutions are $$x_i=\dfrac{\Delta_i}{\Delta}$$$

Homogeneous systems

If a system with $$m$$ equations and $$n$$ unknowns has all the constant terms equal to zero it is said that it is homogeneous.

It only admits the trivial solution $$x_1=x_2=\ldots=x_n=0$$\$

The necessary and sufficient condition so that a homogeneous system has solutions other than the trivial one is that the rank of the matrix of the coefficients is lower than the number of unknowns, or in other words, that the determinant of the matrix of the coefficients is zero. Therefore, to solve an homogeneous system we will have to make it so that the determinant is not zero to ensure that its solution is not the trivial one.