You are on page 1of 23

Systems of Linear Equations and Matrices

This can be transformed into a matrix form AX = B

a11x1  a12 x2    a1n xn  b1 a11 a12 ⋯ a1n x1 b1


a21x1  a22 x2    a2 n xn  b2 a21 a22 ⋯ a2n x2 b2
 ⋮ ⋮ ⋱ ⋮ ⋮ = ⋮
am1 x1  am 2 x2    amn xn  bm am1 an2 ⋯ amn xn bm

A X B
Systems of Linear Equations and Matrices

3x1 + x2 + x3 = 40 3 1 1 x1 40
x1 + x2 + x3 = 30 1 1 1 x2 = 30
4 x1 +3x2 + x3 = 60 4 3 1 x3 60
A X B

In matrix form, AX = B

A solution to a linear system of m equations in n unknowns is a set of


values for the unknowns ( that is x1, x2, x3 or X in the example above)
that satisfies each of the system’s m equations.
Basic Properties of Matrices
Suppose A, B, C, are regular matrices, I is an identity matrix, and
0 a matrix with zero for all entries. Then the following properties
hold.
Addition Properties
– Associative: (A + B) + C = A + (B+ C)
– Commutative: A + B = B + A
– Additive Identity: A + 0 = 0 + A = A
– Additive Inverse: A + (-A) = (-A) + A = 0
Basic Properties of Matrices

• Multiplication Properties
– Associative Property: A(BC) = (AB)C
– Multiplicative identity: AI = IA = A
– Multiplicative inverse: If A is a square matrix and A-1 exists, then AA-1
= A-1A = I
• Combined Properties
– Left distributive: A(B + C) = AB + AC
– Right distributive: (B + C)A = BA + CA

4
Basic Properties of Matrices

• Equality
– Addition: If A = B, then A + C = B + C
– Left multiplication: If A = B, then CA = CB
– Right multiplication: If A = B, then AC = BC

The use of these properties is best illustrated by an example of solving


a matrix equation.
Example: Given an n x n matrix A and an n x p matrix B and a third
matrix denoted by X, we will solve the matrix equation AX = B for X.
Solving Systems of Linear Equations with Matrices
AX = B
Multiply on the left by A-1:
A-1 (AX) = A-1B.
(A-1 A)X = A-1B
IX=A-1B
Let A-1B=K  IX = K
X=K
Thus, if we can transform AX =B to the form IX = K,
then X = K, and K would be the solution to the system of
linear equations AX = B
Solving Systems of Linear Equations with Matrices
a11 a12 ⋯ a1n x1 b1
a21 a22 ⋯ a2n x2 b2
⋮ ⋮ ⋱ ⋮ ⋮ = ⋮
an1 an2 ⋯ ann xn bn

1 0 ⋯ 0 x1 k1 x1 k1
0 1 ⋯ 0 x2 k2 x2 k2
⋮ ⋮ ⋱ ⋮ ⋮ = ⋮ ⋮ = ⋮
0 0 ⋯ 1 xn kn xn kn
Solving Systems of Linear Equations with Matrices
How do you transform AX = B to IX = K ?

The Gauss-Jordan Method


The Gauss-Jordan method transform AX = B to IX = K through the so-called
Elementary Row Operations (ERO) of matrices.

An ERO transforms a given matrix A into a new matrix A*


via one (or a combination) of the following operations.
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method

ERO Type 1: Obtain A* by multiplying any row of A by a nonzero


scalar.
3 1 1
For example, given A= 1 1 1
4 3 1

if we multiply row 2 of matrix A by 3 we obtain the matrix A* as shown


below.
3 1 1
A* = 3 3 3
4 3 1
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method
ERO Type 2(Addition): Obtain A* by adding a row to another row or
by multiplying a row of A by a nonzero scalar and adding it to another
row. 3 1 1
For example, given A = 1 1 1
4 3 1
if we add row 3 of matrix A to row 1, we obtain the matrix A* as shown
below.
7 4 2
A* = 1 1 1
4 3 1
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method
As another example, given
3 1 1
A= 1 1 1
4 3 1

if we multiply row 2 of matrix A by -2 and add to row 3, we obtain the


matrix A* as shown below.
3 1 1
A* = 1 1 1
2 1 -1
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method
ERO Type 3(Row Interchange): Obtain A* by interchanging any two
rows of A.
For example, given 3 1 1
A= 1 1 1
4 3 1
if we interchange rows 1 and 3, we obtain the matrix A* as shown
below.
4 3 1
A* = 1 1 1
3 1 1
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method
Example EROs
3 1 1 20 6 4 4 140
A= 1 1 1 40 3*row 2+ row 1 A* = 1 1 1 40
4 3 1 10 4 3 1 10

6 4 4 140
row 1+ row 2 A* = 7 5 5 180
4 3 1 10

4 3 1 10
A* = 7 5 5 180
Interchange row 1 and row 3
6 4 4 140
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method
To obtain the solution for the linear systems of equations, continue to
perform ERO’s till AX =B is transformed to the form IX = K. That is
until the matrix A is transformed into an identity matrix.

Example: Solve the following system of linear equations.


3x1 + x2 + x3 = 40 3 1 1 x1 40
x1 + x2 + x3 = 30 1 1 1 x2 = 30
4 x1 +3x2 + x3 = 60 4 3 1 x3 60
A X B
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method
3 1 1 x1 40
1 1 1 x2 = 30
4 3 1 x3 60

3 1 1 40 2 0 0 10
1 1 1 30 Row1 - Row2 1 1 1 30
4 3 1 60 4 3 1 60

1 0 0 5 1 0 0 5
1 1 1 30 0 1 1 25
Row2 – Row1
4 3 1 60 4 3 1 60
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method

1 0 0 5 1 0 0 5
0 1 1 25 Row3 – 4 x Row1 0 1 1 25
4 3 1 60 0 3 1 40

1 0 0 5 1 0 0 5
0 1 1 25 Row3 divide by -2 0 1 1 25
0 0 -2 -35 0 0 1 17.5
Solving Systems of Linear Equations with Matrices
The Gauss-Jordan Method

1 0 0 5 1 0 0 5
0 1 1 25 Row2 – Row3 0 1 0 7.5
0 0 1 17.5 0 0 1 17.5
I
Since the left part of the augmented matrix is an identity matrix, we stop.
x1 5
x2 = 7.5
x3 17.5
Solving Systems of Linear Equations with Matrices

AX = B
X=A-1B
This implies, if you have the inverse of matrix A, there is no need to
perform a Gauss-Jordan Method; just multiply the inverse of A by B.
Solving Systems of Linear Equations with Matrices
Inverse of a matrix
How do you find the inverse of a matrix? Apply the Gauss-Jordan method.
We know AA-1 = I
Suppose B is any matrix that satisfies
AB = I
If we multiply the left side of both side by A-1 , we get
A-1AB = A-1I
IB = A-1I
IB = A-1
This means, B must be the inverse of A

Because of this, we can apply the Gauss-Jordan method to find the inverse
of a matrix.
Solving Systems of Linear Equations with Matrices
Inverse of a matrix
To see this, if given
3 1 1 a b c
A= 1 1 1 if B = d e f is the inverse of A, then
4 3 1 g h i

3 1 1 a b c 1 0 0
AB =I 1 1 1 d e f = 0 1 0
4 3 1 g h i 0 0 1

We can transform AB = I 1 0 0 a b c j k m
into the form IB = A-1 to 0 1 0 d e f = n o p
obtain the inverse of A. 0 0 1 g h i q r s
I B A-1
Solving Systems of Linear Equations with Matrices
Inverse of a matrix: The Gauss-Jordan Method
3 1 1 a b c 1 0 0
1 1 1 d e f = 0 1 0
4 3 1 g h i 0 0 1

3 1 1 1 0 0 2 0 0 1 -1 0
1 1 1 0 1 0 Row1 - Row2 1 1 1 0 1 0
4 3 1 0 0 1 4 3 1 0 0 1

1 0 0 1/2 -1/2 0 1 0 0 1/2 -1/2 0


1 1 1 0 1 0 Row2 – Row1 0 1 1 -1/2 3/2 0
4 3 1 0 0 1 4 3 1 0 0 1
Solving Systems of Linear Equations with Matrices
Inverse of a matrix: The Gauss-Jordan Method

1 0 0 1/2 -1/2 0 1 0 0 1/2 -1/2 0


0 1 1 -1/2 3/2 0 Row3 – 4 x Row1 0 1 1 -1/2 3/2 0
4 3 1 0 0 1 0 3 1 -2 2 1

1 0 0 1/2 -1/2 0 1 0 0 1/2 -1/2 0


0 1 1 -1/2 3/2 0 Row3 divided by -2 0 1 1 -1/2 3/2 0
0 0 -2 -1/2 -5/2 1 0 0 1 1/4 5/4 -1/2
Solving Systems of Linear Equations with Matrices
Inverse of a matrix: The Gauss-Jordan Method

1 0 0 1/2 -1/2 0 1 0 0 1/2 -1/2 0


0 1 1 -1/2 3/2 0 Row2 – Row3 0 1 0 -3/4 1/4 1/2
0 0 1 1/4 5/4 -1/2 0 0 1 1/4 5/4 -1/2
I
Since the left part of the augmented matrix is an identity matrix, we stop.
a b c 1/2 -1/2 0
The inverse of A is thus, d e f = -3/4 1/4 1/2
g h i 1/4 5/4 -1/2

You might also like