# Systems of Linear Equations

## General representation of a system of linear equations

Generally allows a linear system with m equations and n unknowns by appropriate transformations always bring in the following form:

$\begin{array}{c}{a}_{11}{x}_{1}+{a}_{12}{x}_{2}+\dots +{a}_{1n}{x}_{n}={b}_{1}\\ {a}_{21}{x}_{1}+{a}_{22}{x}_{2}+\dots +{a}_{2n}{x}_{n}={b}_{2}\\ ⋮\\ {a}_{m1}{x}_{1}+{a}_{m2}{x}_{2}+\dots +{a}_{mn}{x}_{n}={b}_{m}\end{array}$

Matrix form of the linear equation system

The linear system of equations can be represented by a coefficient matrix A in matrix notation:

$\left(\begin{array}{c}{a}_{11}\phantom{\rule{1em}{0ex}}{a}_{12}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{1n}\\ {a}_{21}\phantom{\rule{1em}{0ex}}{a}_{22}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{2n}\\ ⋮\\ {a}_{m1}\phantom{\rule{1em}{0ex}}{a}_{m2}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{mn}\end{array}\right)\left(\begin{array}{c}{x}_{1}\\ {x}_{2}\\ ⋮\\ {x}_{n}\end{array}\right)=\left(\begin{array}{c}{b}_{1}\\ {b}_{2}\\ ⋮\\ {b}_{n}\end{array}\right)$

or short:

$A·x=b$

For the definition of the equation system, an indication of the unknown is not required. With the extended coefficient matrix the system of equations can be written as follows:

$\left(A|b\right)=\left(\begin{array}{c}{a}_{11}\phantom{\rule{1em}{0ex}}{a}_{12}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{1n}\\ {a}_{21}\phantom{\rule{1em}{0ex}}{a}_{22}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{2n}\\ ⋮\\ {a}_{m1}\phantom{\rule{1em}{0ex}}{a}_{m2}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{mn}\end{array}|\begin{array}{c}{b}_{1}\\ {b}_{2}\\ ⋮\\ {b}_{n}\end{array}\right)$

To find the solution of a linear system of equations, the following three elementary row transformations are useful. The solution set does not change when the following operations:

• interchanging two rows
• multiplying a row by a nonzero number
• adding a line (or multiple of a row) to another row

Solution of the linear system

If the extended coefficient matrix brought to triangular form (row echelon form) by means of elementary transformations, the solution can be read directly.

$\left(\begin{array}{c}{a}_{11}\phantom{\rule{1em}{0ex}}{a}_{12}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{1n}\\ 0\phantom{\rule{2em}{0ex}}{a}_{22}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{2n}\\ ⋮\\ 0\phantom{\rule{1em}{0ex}}0\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}0\phantom{\rule{1em}{0ex}}{a}_{mn}\end{array}|\begin{array}{c}{b}_{1}\\ {b}_{2}\\ ⋮\\ {b}_{n}\end{array}\right)$

## Gaussian Elimination Method

The Gaussian algorithm is based on equivalent transformations of the system of linear equations. The transformations: row interchange, multiplication of rows with non-zero factors and addition of multiples of a row with a different transform the system of equations to be solved in a simple form.

Step-by-step example for the Gaussian Elimination Method

The coefficient matrix in the example is:

$\left(\begin{array}{ccc}4.89& 7.02& 3.55\\ 0.29& 2.57& 7.53\\ 2.86& 6.90& 8.22\end{array}|\begin{array}{c}1.22\\ 1.61\\ 2.32\end{array}\right)$

Calculation of the row echelon form (Gaussian elimination)

Division of line 1 by the element a1,1=4.89

$\left(\begin{array}{ccc}1.00& 1.44& 0.73\\ 0.29& 2.57& 7.53\\ 2.86& 6.90& 8.22\end{array}|\begin{array}{c}0.25\\ 1.61\\ 2.32\end{array}\right)$

Subtraction of the 1st line from the following lines. The 1st line is multiplied by the leading element of the following lines.

$\left(\begin{array}{ccc}1.00& 1.44& 0.73\\ 0.00& 2.15& 7.32\\ 0.00& 2.79& 6.14\end{array}|\begin{array}{c}0.25\\ 1.54\\ 1.61\end{array}\right)$

Division of line 2 by the element a2,2=2.15

$\left(\begin{array}{ccc}1.00& 1.44& 0.73\\ 0.00& 1.00& 3.40\\ 0.00& 2.79& 6.14\end{array}|\begin{array}{c}0.25\\ 0.71\\ 1.61\end{array}\right)$

Subtraction of the 2nd line from the following lines. The 2nd line is multiplied by the leading element of the following lines.

$\left(\begin{array}{ccc}1.00& 1.44& 0.73\\ 0.00& 1.00& 3.40\\ 0.00& 0.00& -3.35\end{array}|\begin{array}{c}0.25\\ 0.71\\ -0.39\end{array}\right)$

Division der Zeile 3 durch das Element a3,3=-3.35

$\left(\begin{array}{ccc}1.00& 1.44& 0.73\\ 0.00& 1.00& 3.40\\ 0.00& 0.00& 1.00\end{array}|\begin{array}{c}0.25\\ 0.71\\ 0.12\end{array}\right)$

Calculation of the reduced row echelon form (Jordan-Algorithm)

Subtraction of 1.44 times of line 2 from line 1

$\left(\begin{array}{ccc}1.00& 0.00& -4.15\\ 0.00& 1.00& 3.40\\ 0.00& 0.00& 1.00\end{array}|\begin{array}{c}-0.78\\ 0.71\\ 0.12\end{array}\right)$

Subtraction of 3.40 times the line 3 from the line 2

$\left(\begin{array}{ccc}1.00& 0.00& -4.15\\ 0.00& 1.00& 0.00\\ 0.00& 0.00& 1.00\end{array}|\begin{array}{c}-0.78\\ 0.32\\ 0.12\end{array}\right)$

Subtraction of -4.15 times of line 3 from line 1

$\left(\begin{array}{ccc}1.00& 0.00& 0.00\\ 0.00& 1.00& 0.00\\ 0.00& 0.00& 1.00\end{array}|\begin{array}{c}-0.29\\ 0.32\\ 0.12\end{array}\right)$

The solution of the linear equation system is now given in the right column.

$\begin{array}{ccc}{x}_{1}& =& -0.29\\ {x}_{2}& =& 0.32\\ {x}_{3}& =& 0.12\end{array}$

## Cramers Rule

The Cramers rule uses determiants to solve a system of linear equations. For the case of a linear (N×N) system of equations with det(A) not equal to 0, the solution can be expressed in the following form:

$x={A}^{-1}b$

${x}_{i}=\frac{1}{\mathrm{det A}}|\begin{array}{c}{a}_{11}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{b}_{1}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{1n}\\ {a}_{21}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{b}_{2}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{2n}\\ ⋮\\ {a}_{n1}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{b}_{n}\phantom{\rule{1em}{0ex}}\dots \phantom{\rule{1em}{0ex}}{a}_{nn}\end{array}|$

${x}_{i}=\frac{{D}_{i}}{D}$

The determinant in the numerator Di from D = det A is shown by the i-th column in D is replaced by b.

Example for the application of the Cramers Rule

The coefficient matrix in the example is:

$\left(\begin{array}{ccc}9.07& 2.2& 5.37\\ 7.92& 3.82& 0.47\\ 0.33& 9.06& 7.81\end{array}|\begin{array}{c}8.09\\ 1.51\\ 0.39\end{array}\right)$

The solution of the equation system is:

${x}_{1}=\frac{1}{\mathrm{det\left(A\right)}}|\begin{array}{ccc}8.09& 2.20& 5.37\\ 1.51& 3.82& 0.47\\ 0.39& 9.06& 7.81\end{array}|=\frac{246.83}{474.79}=0.52$

${x}_{2}=\frac{1}{\mathrm{det\left(A\right)}}|\begin{array}{ccc}9.07& 8.09& 5.37\\ 7.92& 1.51& 0.47\\ 0.33& 0.39& 7.81\end{array}|=\frac{-379.94}{474.79}=-0.80$

${x}_{3}=\frac{1}{\mathrm{det\left(A\right)}}|\begin{array}{ccc}9.07& 2.20& 8.09\\ 7.92& 3.82& 1.51\\ 0.33& 9.06& 0.39\end{array}|=\frac{454.03}{474.79}=0.96$

### Further solution methods for small systems of equations

In the addition method, the equations are added, so that for each addition step, a variable is eliminated. To each one of the equations to be transformed so that the corresponding variable drops out during the addition.

$4·x-2·y=9$

$4·x+y=3$

$4·x-2·y=9$

$8·x+2·y=6$

$12·x=15$

$x=\frac{15}{12}=\frac{5}{4}$

$y=\frac{4}{2}·x-\frac{9}{2}$

$y=\frac{4}{2}·\frac{5}{4}-\frac{9}{2}=\frac{5}{2}-\frac{9}{2}=-2$

1. Transformation: Multiply the second equation by 2

2. Transformation: addition of equations eliminated the variable y.

3. Forming: Division by 12 gives the solution the variable x.

4. Transformation: Resolving the first equation for y.

5. Forming: Inserting the solution for x in the equation is the solution for y.

#### Equating Method

Example: Equating Method

$4·x-2·y=9$

$4·x+y=3$

$y=2x-\frac{9}{2}$

$y=3-4x$

$3-4x=2x-\frac{9}{2}$

$6x=3+\frac{9}{2}=\frac{15}{2}$

$x=\frac{15}{12}=\frac{5}{4}$

$y=\frac{4}{2}·\frac{5}{4}-\frac{9}{2}=\frac{5}{2}-\frac{9}{2}=-2$

1. Transformation: Dissolving both equations for y.

2. Forming: Equating equations.

3. Forming: Solving for x gives the solution for the variable x.

4. Forming: Insert of the solution for x in the equation for y results the solution for y.

#### Elimination of variables

Example: Elimination of variables

$4·x-2·y=9$

$4·x+y=3$

$y=2x-\frac{9}{2}$

$4x+2x-\frac{9}{2}=3$

$6x=3+\frac{9}{2}=\frac{15}{2}$

$x=\frac{15}{12}=\frac{5}{4}$

$y=\frac{4}{2}·\frac{5}{4}-\frac{9}{2}=\frac{5}{2}-\frac{9}{2}=-2$

1. Forming: Resolving equation for y.

2. Forming: Insertion in the other equation.

3. Forming: Solving for x gives the solution for the variable x.

4. Forming: Inserting the solution for x to y results in the resolution equation, the solution for y.

## More Calculators

Here is a list of of further useful calculators and sites:

Index Linear Equations Linear Equation Systems Calculator 2x2 systems Calculator 3x3 systems Calculator NxN Cramer's rule Calculator NxN Gauss method Matrix Determinant