You are on page 1of 16

MATRICES

Using matrices to solve


Systems of Equations
Solving Systems with Matrices
We can use matrices to solve systems that
involve 2 x 2 (2 equations, 2 variables) and 3
x 3 (3 equations, 3 variables) systems. We
will look at two methods:
Cramers Rule (uses determinants)

Matrix Equations (uses inverse matrices)
Cramers Rule - 2 x 2
Cramers Rule relies on determinants
Consider the system below with
variables x and y:
a
1
x + b
1
y = C
1
a
2
x + b
2
y = C
2
Cramers Rule - 2 x 2
The formulae for the values of x and y are
shown below. The numbers inside the
determinants are the coefficients and
constants from the equations.
x =
C
1
b
1
C
2
b
2
a
1
b
1
a
2
b
2
y =
a
1
C
1
a
2
C
2
a
1
b
1
a
2
b
2
Cramers Rule - 3 x 3
Consider the 3 equation system below with
variables x, y and z:
a
1
x + b
1
y + c
1
z = C
1
a
2
x + b
2
y + c
2
z = C
2
a
3
x + b
3
y + c
3
z = C
3
Cramers Rule - 3 x 3
The formulae for the values of x, y and z are
shown below. Notice that all three have the
same denominator.
x =
C
1
b
1
c
1
C
2
b
2
c
2
C
3
b
3
c
3
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3
y =
a
1
C
1
c
1
a
2
C
2
c
2
a
3
C
3
c
3
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3
z =
a
1
b
1
C
1
a
2
b
2
C
2
a
3
b
3
C
3
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3
Cramers Rule
Not all systems have a definite solution. If the
determinant of the coefficient matrix is zero, a
solution cannot be found using Cramers Rule because
of division by zero.
When the solution cannot be determined, one of two
conditions exists:
The planes graphed by each equation are parallel and there
are no solutions.
The three planes share one line (like three pages of a book
share the same spine) or represent the same plane, in which
case there are infinite solutions.
Cramers Rule
x =
9 2 1
5 2 2
2 1 4
3 2 1
1 2 2
1 1 4
=
23
23
= 1
y =
3 9 1
1 5 2
1 2 4
3 2 1
1 2 2
1 1 4
=
69
23
= 3
Example: 3x - 2y + z = 9
Solve the system x + 2y - 2z = -5
x + y - 4z = -2
Cramers Rule
3x - 2y + z = 9

x + 2y - 2z = -5
x + y - 4z = -2
z =
3 2 9
1 2 5
1 1 2
3 2 1
1 2 2
1 1 4
=
0
23
= 0
The solution is
(1, -3, 0)
Matrix Equations
Step 1: Write the system as a matrix
equation. A three equation
system is shown below.
a
1
x + b
1
y + c
1
z = C
1
a
2
x + b
2
y + c
2
z = C
2
a
3
x + b
3
y + c
3
z = C
3
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3

(
(
(
x
y
z

(
(
(
=
C
1
C
2
C
3

(
(
(
Matrix Equations
Step 2: Find the inverse of the
coefficient matrix.

This can be done by hand for a 2 x 2
matrix; most graphing calculators can
find the inverse of a larger matrix.
Matrix Equations
Step 3: Multiply both sides of the matrix
equation by the inverse.

The inverse of the coefficient matrix times
the coefficient matrix equals the identity matrix.
x
y
z

(
(
(
=
a
1
b
1
c
1
a
2
b
2
c
2
a
3
b
3
c
3

(
(
(
1
-
C
1
C
2
C
3

(
(
(
Note: The multiplication order on the right side is very
important. We cannot multiply a 3 x 1 times a 3 x 3 matrix!
Matrix Equations
Example: Solve the system
3x - 2y = 9
x + 2y = -5
3 2
1 2

(
x
y

(
=
9
5

(
3 2
1 2

(
1
=
1
8
2 2
1 3

(
x
y

(
=
1
8
2 2
1 3

(
9
5

(
Matrix Equations

x
y

(
=
1
8
2 2
1 3

(
9
5

(
Multiply the matrices (a 2 x 2 times a
2 x 1) first, then distribute the scalar.
x
y

(
=
1
8
8
24

(
x
y

(
=
1
3

(
Matrix Equations
Example #2: Solve the 3 x 3 system

3x - 2y + z = 9
x + 2y - 2z = -5
x + y - 4z = -2
3 2 1
1 2 2
1 1 4

(
(
(
x
y
z

(
(
(
=
9
5
2

(
(
(
3 2 1
1 2 2
1 1 4

(
(
(
1
=
6
23
7
23

2
23

2
23
13
23

7
23
1
23
5
23

8
23

(
(
(
Using a graphing calculator:
Matrix Equations
6 7 2
23 23 23
13 7 2
23 23 23
5 8 1
23 23 23
9
5
2

( ( (
( ( (
=
( ( (
( ( (


x
y
z
1
3
0
( (
( (
=
( (
( (

x
y
z

You might also like