# Formulas

## Matrices and Determinants # Systems of Linear Equations

• Matrices and vectors: $$A$$, $$B$$, $$X$$
Coefficients of equations: $${a_{ij}},$$ $${a_i},$$ $${b_i},$$ $${c_i},$$ $${d_i}$$
Inverse matrix: $$A^{-1}$$
Determinants: $$D,$$ $${D_x},$$ $${D_y},$$ $${D_z}$$
Unknown variables: $$x,$$ $$y,$$ $$z,$$ $${x_1},$$ $${x_2},$$ $$\ldots$$
Natural numbers: $$n,$$ $$i,$$ $$j$$
1. Solution of a system of equations in two variables by the Cramer’s rule
Given a system of two linear equations with two unknowns:
\left\{ \begin{aligned} {a_1}x + {b_1}y &= {d_1} \\ {a_2}x + {b_2}y &= {d_2} \end{aligned} \right..

The solution of this system is expressed by the formulas
$$x = {\large\frac{{{D_x}}}{D}\normalsize},\;$$ $$y = {\large\frac{{{D_y}}}{D}\normalsize}\;$$ (Cramer’s formulas),
where the determinants $$D$$, $${D_x}$$, $${D_y}$$ are given by
$$D = \left| {\begin{array}{*{20}{c}} {{a_1}}&{{b_1}}\\ {{a_2}}&{{b_2}} \end{array}} \right| =$$ $${a_1}{b_2} – {a_2}{b_1},\;$$ $${D_x} = \left| {\begin{array}{*{20}{c}} {{d_1}}&{{b_1}}\\ {{d_2}}&{{b_2}} \end{array}} \right| =$$ $${d_1}{b_2} – {d_2}{b_1},\;$$ $${D_y} = \left| {\begin{array}{*{20}{c}} {{a_1}}&{{d_1}}\\ {{a_2}}&{{d_2}} \end{array}} \right| =$$ $${a_1}{d_2} – {a_2}{d_1}.$$
2. Special cases of the solutions of a system of equations in two variables
– If $$D \ne 0$$, then the system is consistent and has the single solution $$x = {\large\frac{{{D_x}}}{D}\normalsize},\;$$ $$y = {\large\frac{{{D_y}}}{D}\normalsize};$$
– If $$D = 0$$ and $${D_x} \ne 0$$ (or $${D_y} \ne 0$$), then the system is inconsistent (has no solutions);
– If $$D = {D_x}$$ $$= {D_y}$$ $$= 0$$, then the system is consistent and has an infinite set of solutions.
3. Solution of a system of equations in three variables by the Cramer’s rule
Consider a system of $$3$$ equations with $$2$$ unknowns:
\left\{ \begin{aligned} {a_1}x + {b_1}y + {c_1}z &= {d_1} \\ {a_2}x + {b_2}y + {c_2}z &= {d_2} \\ {a_3}x + {b_3}y + {c_3}z &= {d_3} \end{aligned} \right..

The solution of this system is determined by the Cramer’s formulas:
$$x = {\large\frac{{{D_x}}}{D}\normalsize},\;$$ $$y = {\large\frac{{{D_y}}}{D}\normalsize},\;$$ $$z = {\large\frac{{{D_z}}}{D}\normalsize},$$
where the determinants $$D$$, $${D_x}$$, $${D_y}$$, $${D_z}$$ are given by
$$D = \left| {\begin{array}{*{20}{c}} {{a_1}}&{{b_1}}&{{c_1}}\\ {{a_2}}&{{b_2}}&{{c_2}}\\ {{a_3}}&{{b_3}}&{{c_3}} \end{array}} \right|,\;$$ $${D_x} = \left| {\begin{array}{*{20}{c}} {{d_1}}&{{b_1}}&{{c_1}}\\ {{d_2}}&{{b_2}}&{{c_2}}\\ {{d_3}}&{{b_3}}&{{c_3}} \end{array}} \right|,\;$$ $${D_y} = \left| {\begin{array}{*{20}{c}} {{a_1}}&{{d_1}}&{{c_1}}\\ {{a_2}}&{{d_2}}&{{c_2}}\\ {{a_3}}&{{d_3}}&{{c_3}} \end{array}} \right|,\;$$ $${D_z} = \left| {\begin{array}{*{20}{c}} {{a_1}}&{{b_1}}&{{d_1}}\\ {{a_2}}&{{b_2}}&{{d_2}}\\ {{a_3}}&{{b_3}}&{{d_3}} \end{array}} \right|.$$
4. Special cases of the solutions of a system of equations in three variables
– If $$D \ne 0$$, then the system is consistent and has the single solution $$x = {\large\frac{{{D_x}}}{D}\normalsize},\;$$ $$y = {\large\frac{{{D_y}}}{D}\normalsize}\;$$ $$z = {\large\frac{{{D_z}}}{D}\normalsize} ;$$
– If $$D = 0$$ and $${D_x} \ne 0$$ (or $${D_y} \ne 0$$ or $${D_z} \ne 0$$), then the system is inconsistent (i.e. it has no solutions);
5. Linear system of $$n$$ equations with $$n$$ unknowns in matrix form
A system of linear equations of order $$n$$
\left\{ \begin{aligned} {a_{11}}{x_1} + {a_{12}}{x_2} + \ldots + {a_{1n}}{x_n} &= {b_1} \\ {a_{21}}{x_1} + {a_{22}}{x_2} + \ldots + {a_{2n}}{x_n} &= {b_2} \\ \ldots\ldots\ldots\ldots\ldots\ldots\ldots\ldots\ldots \\ {a_{n1}}{x_1} + {a_{n2}}{x_2} + \ldots + {a_{nn}}{x_n} &= {b_n} \end{aligned} \right.
can be written in matrix form:
$$\left[ {\begin{array}{*{20}{c}} {{a_{11}}}&{{a_{12}}}& \ldots &{{a_{1n}}}\\ {{a_{21}}}&{{a_{22}}}& \ldots &{{a_{2n}}}\\ \vdots & \vdots &{}& \vdots \\ {{a_{n1}}}&{{a_{n2}}}& \ldots &{{a_{nn}}} \end{array}} \right] \cdot$$ $$\left[ {\begin{array}{*{20}{c}} {{x_1}}\\ {{x_2}}\\ \vdots \\ {{x_n}} \end{array}} \right] =$$ $$\left[ {\begin{array}{*{20}{c}} {{b_1}}\\ {{b_2}}\\ \vdots \\ {{b_n}} \end{array}} \right],$$
or in more compact form:
$$AX = B$$,
where we use the notation
$$A =$$ $$\left[ {\begin{array}{*{20}{c}} {{a_{11}}}&{{a_{12}}}& \ldots &{{a_{1n}}}\\ {{a_{21}}}&{{a_{22}}}& \ldots &{{a_{2n}}}\\ \vdots & \vdots &{}& \vdots \\ {{a_{n1}}}&{{a_{n2}}}& \ldots &{{a_{nn}}} \end{array}} \right],\;$$ $$X = \left[ {\begin{array}{*{20}{c}} {{x_1}}\\ {{x_2}}\\ \vdots \\ {{x_n}} \end{array}} \right],\;$$ $$B = \left[ {\begin{array}{*{20}{c}} {{b_1}}\\ {{b_2}}\\ \vdots \\ {{b_n}} \end{array}} \right].$$
6. The solution of a system of $$n$$ equations with $$n$$ unknowns has the form
$$X = A^{-1}B$$,
where $$A^{-1}$$ is the inverse matrix.