 # System of Linear Equations (Using Matrices) How to solve the system of linear equations by using matrices: formula, examples, and their solutions.

## Formula To solve the system of linear equations
by using matrices,
you should know this formula.

If A[x / y] = [p / q],
then [x / y] = A-1[p / q].

It's like dividing both sides by a matrix A.

Inverse matrices (2x2)

## Example 1 Previously, you've solved this example.

Substitution method

Elimination method

Let's solve the same example
by using the matrices.

Use the coefficients of x and y
to make a matrix equation.

Then [1 -1 / 2 1][x y] = [4 / 5].

To find the inverse matrix of [1 -1 / 2 1],
first find the determinant.

The determinant is 1⋅1 - (-1)⋅2.

Determinant of a matrix (2x2)

1⋅1 = 1
-(-1)⋅2 = +2

1 + 2 = 3

So the determinant of [1 -1 / 2 1] is 3.

Multiply the inverse matrix of [1 -1 / 2 1]
in front of both sides.

Then, by the previous formula,
the left side is [x / y].

And the right side is,
the inverse matrix of [1 -1 / 2 1], (1/3)[1 +1 / -2 1]
times [4 / 5].

Inverse matrices (2x2)

Multiply [1 +1 / -2 1][4 / 5].

Multiplying matrices

[Row 1]⋅[4 / 5]: 1⋅4 + 1⋅5
[Row 2]⋅[4 / 5]: (-2)⋅4 + 1⋅5

1⋅4 = 4
1⋅5 = 5

(-2)⋅4 = -8
1⋅5 = 5

4 + 5 = 9
-8 + 5 = -3

Then (right side) = (1/3)[9 / -3].

Multiply (1/3) to each elements.

Then [x / y] = [3 / -1].

[x / y] = [3 / -1]

So (x, y) = (3, -1).

## Example 2: Infinitely Many Solutions Use the coefficients of x and y
to make a matrix equation.

Then [1 2 / 2 4][x y] = [3 / 6].

Find the determinant.

The determinant is 1⋅4 - 2⋅2.

1⋅4 = 4
2⋅2 = 4

4 - 4 = 0

So the determinant is 0.

If the determinant is 0,
then the inverse matrix does not exist.

Inverse matrices (2x2) - Example 2

So [x / y] cannot be found as a matrix.

In other words,
the given system has either
'infinitely many solutions' or 'no solution'.

To find out the case,
set a proportion
using the elements of the matrices,
1/2 = 2/4 = 3/6,
and see if this proportion is true.

This proportion is true.

Then the given system has
infinitely many solutions.

## Example 3: No Solution Use the coefficients of x and y
to make a matrix equation.

Then [1 2 / 2 4][x y] = [3 / 1].

Find the determinant.

The determinant is 1⋅4 - 2⋅2.

1⋅4 = 4
2⋅2 = 4

4 - 4 = 0

So the determinant is 0.

If the determinant is 0,
then the inverse matrix does not exist.

So the given system has either
'infinitely many solutions' or 'no solution'.

To find out the case,
set a proportion
using the elements of the matrices,
1/2 = 2/4 = 3/1,
and see if this proportion is true.

This proportion is false
because 1/2 = 2/4 ≠ 3/1.

Then the given system has no solution.