# System of Linear Equations (Using Matrix)

How to solve the system of linear equations by using matrix (2x2): 3 examples and their solutions.

## Examplex - y = 4, 2x + y = 5

First, make a 2x2 matrix

by using the coefficients of x and y.

[1 -1 / 2 1]

Write [x / y] matrix.

And write a matrix

by using the constant terms.

[4 / 5]

So the given system of linear equation becomes

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

To solve [1 -1 / 2 1][x / y] = [4 / 5],

check if [1 -1 / 2 1]^{-1} exists.

And to check if [1 -1 / 2 1]^{-1} exists,

find the determinant of [1 -1 / 2 1].

Inverse Matrix (2x2)

det (A) = 1⋅1 - (-1)⋅2

1⋅1

= 1

-(-1)⋅2

= +1⋅2

= 2

1 + 2 = 3

det (A) = 3 ≠ 0

So [1 -1 / 2 1]^{-1} exists.

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

How to Solve AX = B

Find [1 -1 / 2 1]^{-1}.

Inverse Matrix (2x2)

Write

1 over, det (A), 3

times,

switch a and d, 1 and 1

and change the signs of b and c, 1 and -2.

And write the back matrix [4 / 5].

So

[1 -1 / 2 1]^{-1}[4 / 5]

= (1/3)[1 1 / -2 1][4 / 5].

Write the coefficient 1/3.

Solve [1 1 / -2 1][4 / 5].

Multiply Matrices

Row 1, column 1:

1⋅4 + 1⋅5

Row 2, column 1:

-2⋅4 + 1⋅5

So

(1/3)[1 1 / -2 1][4 / 5]

= (1/3)[1⋅4 + 1⋅5 / -2⋅4 + 1⋅5].

1⋅4 + 1⋅5

= 4 + 5

-2⋅4 + 1⋅5

= -8 + 5

4 + 5 = 9

-8 + 5 = -3

(1/3)[9 / -3] = [3 / -1]

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

So x = 3 and y = -1.

So

x = 3

y = -1

is the answer.

## Examplex - y = 4, 2x - 2y = 8

First, make a 2x2 matrix

by using the coefficients of x and y.

[1 -1 / 2 -2]

Write [x / y] matrix.

And write a matrix

by using the constant terms.

[4 / 8]

So the given system of linear equation becomes

[1 -1 / 2 -2][x / y] = [4 / 8].

To solve [1 -1 / 2 -2][x / y] = [4 / 8],

check if [1 -1 / 2 -2]^{-1} exists.

And to check if [1 -1 / 2 -2]^{-1} exists,

find the determinant of [1 -1 / 2 -2].

det (A) = 1⋅(-2) - (-1)⋅2

1⋅(-2)

= -2

-(-1)⋅2

= +1⋅2

= +2

-2 + 2 = 0

det (A) = 0

Then [1 -1 / 2 -2]^{-1} does not exist.

This means [x / y] is not one:

either infinitely many solutions

or no solution.

To check which case is right,

use [1 -1 / 2 -2] matrix and [4 / 8] matrix

to set a proportion like this.

1/2 = (-1)/(-2) = 4/8

See if this proportion is true.

(-1)/(-2) = 1/2

4/8 = 1/2

This proportion is true.

Then the given system has

infinitely many solutions.

So

infinitely many solutions

is the answer.

## Examplex - y = 4, x - y = -3

First, make a 2x2 matrix

by using the coefficients of x and y.

[1 -1 / 1 -1]

Write [x / y] matrix.

And write a matrix

by using the constant terms.

[4 / -3]

So the given system of linear equation becomes

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

To solve [1 -1 / 1 -1][x / y] = [4 / -3],

check if [1 -1 / 1 -1]^{-1} exists.

And to check if [1 -1 / 1 -1]^{-1} exists,

find the determinant of [1 -1 / 1 -1].

det (A) = 1⋅(-1) - (-1)⋅1

1⋅(-1)

= -1

-(-1)⋅1

= +1

-1 + 1 = 0

det (A) = 0

Then [1 -1 / 1 -1]^{-1} does not exist.

This means [x / y] is not one:

either infinitely many solutions

or no solution.

To check which case is right,

use [1 -1 / 1 -1] matrix and [4 / -3] matrix

to set a proportion like this.

1/1 = (-1)/(-1) = 4/3

See if this proportion is true.

(-1)/(-2) = 1/1

4/(-3) ≠ 1/1

This proportion is false.

Then the given system has

no solution.

So

no solution

is the answer.