# System of Linear Equations (Using Matrices)

How to solve the system of linear equations by using matrices: examples and their solutions.

## Example 1

Previously, you've solved this example.

System of linear equations: substitution method

Let's solve the same example

by using the matrices.

Use the given equations

to make a matrix equation.

[1 -1 / 2 1]: the coefficients of *x* and *y*.

(Let's say [1 -1 / 2 1] = *A*.)

[4 / 5]: the constants of the equations

Multiply *A*^{-1} to the left side of both sides.

Then the left side's *A* is cancelled:*A*^{-1}⋅*A*[*x* / *y*] = *I*⋅[*x* / *y*].

And the right side becomes *A*^{-1}⋅[4 / 5].

Inverse matrices (2x2)

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

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

## Example 2

Make a matrix equation.

[1 2 / 2 4]: the coefficients of *x* and *y*.

[3 / 6]: the constants of the equations

Multiply the inverse matrix of [1 2 / 2 4]

to the left side of both sides.

But there's a problem:

the determinant is 0.

So the inverse matrix doesn't exist.

This means this system has either

'infinitely many solutions' or 'no solution'.

To find out which case is the answer,

see if the ratios of the coefficients (1/2 = 2/4)

and the ratio of the constants (3/6)

are equal.

(1/2 = 2/4) = (3/6)

So this system has infinitely many solutions.

## Example 3

Make a matrix equation.

[1 2 / 2 4]: the coefficients of *x* and *y*.

[3 / 1]: the constants of the equations

Multiply the inverse matrix of [1 2 / 2 4]

to the left side of both sides.

But there's a problem:

the determinant is 0.

So the inverse matrix doesn't exist.

This means this system has either

'infinitely many solutions' or 'no solution'.

To find out which case is the answer,

see if the ratios of the coefficients (1/2 = 2/4)

and the ratio of the constants (3/1)

are equal.

(1/2 = 2/4) ≠ (3/1)

So this system has no solutions.