0% found this document useful (0 votes)
2 views

Lesson 2 (Final Part)-Matrices

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lesson 2 (Final Part)-Matrices

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

LET’s check your

Asynchronous Tasks
Matrix Rank
The rank is how many of the rows are "unique": not made of other
rows. (Same for columns.)
Matrices
Matrices- -Operations
Operations
INVERSE OF A MATRIX
Consider a scalar k. The inverse is the reciprocal or division of 1
by the scalar.
Example:
k=7 the inverse of k or k-1 = 1/k = 1/7
Division of matrices is not defined since there may be AB = AC
while B = C
Instead matrix inversion is used.
The inverse of a square matrix, A, if it exists, is the unique matrix
A-1 where:
AA-1 = A-1 A = I
Matrices
Matrices- -Operations
Operations
INVERSE OF A MATRIX

An nxn matrix is called nonsingular or invertible, if there


exists an nxn matrix such that
AB=I

called the inverse of A.


Otherwise, A is called singular or non-invertible.
Matrices
Matrices- -Operations
Operations
Example:
3 1
A 
 2 1
1  1  1
A  
 2 3 
Because:
 1  1 3 1 1 0
 2 3  2 1  0 1
   
3 1  1  1 1 0
2 1  2 3   0 1
   
Matrices
Matrices- -Operations
Operations
Matrices
Matrices- -Operations
Operations
Properties of the inverse:

( AB) 1  B 1 A1
1 1
(A )  A
( AT ) 1  ( A1 )T
1 1 1
(kA)  A
k
A square matrix that has an inverse is called a nonsingular matrix
A matrix that does not have an inverse is called a singular matrix
Square matrices have inverses except when the determinant is zero
When the determinant of a matrix is zero the matrix is singular
The Augmented Matrix
of a Linear System
The Augmented Matrix of a Linear System
• We can write a system of linear equations as a matrix, called the
augmented matrix of the system, by writing only the
coefficients and constants that appear in the equations.

Here is an example.
Linear system Augmented matrix

Notice that a missing variable in an equation corresponds to a 0


entry in the augmented matrix.
The Augmented Matrix of a Linear System
Example: Finding the Augmented Matrix of a Linear System
The Augmented Matrix of a Linear System
The Augmented Matrix of a Linear System

Augmented matrix
[A:B]
Echelon Form of a Matrix
What is echelon form?

• “Echelon” is a military term that refers to a


specific type of formation.

• In echelon formation, each member of the


formation is positioned behind and to the
right (or left) of the member ahead
Example of echelon formation
Echelon Form of a Matrix
What does it mean for a matrix to be in
“echelon form”?

• Pay attention to the leading entry in each


row.

• The leading entry of a row is the first non-


zero entry in that row
Echelon Form of a Matrix
Example:
Echelon Form of a Matrix
Example:
Echelon Form of a Matrix
Example:
Echelon Form of a Matrix
Example:
Echelon Form of a Matrix
Example:
ECHELON FORM OF A MATRIX
ECHELON FORM OF A MATRIX
ECHELON FORM OF A MATRIX
ECHELON FORM OF A MATRIX
ECHELON FORM OF A MATRIX
Gaussian Elimination
To solve a system using Gaussian elimination, we use:
Augmented matrix
 Write the augmented matrix of the system

Row-echelon form
 Use elementary row operations to change the augmented
matrix to row-echelon form

Back-substitution
 Write the new system of equations that corresponds to the
row-echelon form of the augmented matrix and solve by
back-substitution
Gaussian Elimination
Systematic way to put a matrix in row-echelon form using
elementary row operations.

 Start by obtaining 1 in the top left corner.

 Then, obtain zeros below that 1 by adding appropriate


multiples of the first row to the rows below it.

1 
0 
 
0 
Gaussian Elimination
Next, obtain a leading 1 in the next row.
Then, obtain zeros below that 1.
At each stage, make sure every leading entry is to the right of
the leading entry in the row above it.
Rearrange the rows if necessary.

1  1 
0   0 1 
   
0  0 0 
Gaussian Elimination
Continue this process until you arrive at a matrix in row-
echelon form.

1  1  1 
0   0 1   0 1 
     
0  0 0  0 0 1 
Once an augmented matrix is in row-echelon form, we can solve
the corresponding linear system using back-substitution.

This technique is called Gaussian elimination, in


honor of its inventor, the German mathematician C. F.
Gauss.
Gaussian Elimination
ELEMENTARY MATRIX OPERATIONS
Gaussian Elimination
Example: Solve the system of linear equations using Gaussian
elimination
 4 x  8 y  4z  4

 3 x  8 y  5z   11
  2 x  y  12z   17

 4 8 4 4
 3 8 5 11
 

 2 1 12 17 

 1 2 1 1


1R
4 1  3 8 5 11
 

 2 1 12 17 

Gaussian Elimination

 1 2 1 1
R2 3R1 R2
   0 2 8 14 
R3  2R1 R3 
 0 5 10 15 

 1 2 1 1
1R
 

2 2  0 1 4  7

 0 5 10 15 
Gaussian Elimination

1 2 1 1
R3 5R2 R3
  0 1 4  7 
0 0 10 20 

 1 2 1 1
 10

1R
3  0 1 4  7 

 0 0 1  2
Gaussian Elimination
We now have an equivalent matrix in row-echelon form.
The corresponding system of equations is:

 x  2y  z  1

 y  4 z  7
 z  2

use back-substitution to solve the system
y + 4(–2) = –7
y=1
x + 2(1) – (–2) = 1
x = –3

The solution of the system is:


(–3, 1, –2)
Gauss-Jordan Elimination
If we put the augmented matrix of a
linear system in reduced row-echelon
form, then we don’t need to back-
substitute to solve the system.

 To put a matrix in reduced row-echelon


form, we use the following steps.
 We see how the process might work
for a 3 x 4 matrix.
Gauss-Jordan Elimination

Use the elementary row operations to put the matrix in


row-echelon form.

1 
0 1 
 
0 0 1 
Gauss-Jordan Elimination
Obtain zeros above each leading entry by adding multiples of
the row containing that entry to the rows above it.

1  1 0 
0 1   0 1 0 
   
0 0 1  0 0 1 
Gauss-Jordan Elimination

Begin with the last leading entry and work up.

1  1 0  1 0 0 
0 1   0 1 0   0 1 0 
     
0 0 1  0 0 1  0 0 1 

Using the reduced row-echelon form to solve a


system is called Gauss-Jordan elimination.
Gauss-Jordan Elimination
Solve the system of linear equations, using Gauss-Jordan
elimination.

 4 x  8 y  4z  4

 3 x  8 y  5z   11
  2 x  y  12z   17

Gauss-Jordan Elimination
Continue using elementary row operations on the last matrix in
example of Gaussian Elimination to arrive at an equivalent matrix
in reduced row-echelon form.

 1 2 1 1
0 1 4 7 
 
0 0 1 2 
Gauss-Jordan Elimination

1 2 0 1
R2  4R3 R2
  0 1 0 1
R1 R3 R1 
0 0 1 2 

1 0 0 3 
R1  2R2 R1

 0 1 0 1

0 0 1 2 
Gauss-Jordan Elimination

The corresponding system of equations is:

 x  3

y  1
 z  2

Hence, we immediately arrive at the solution


(–3, 1, –2).
Solution of the System

No solution: 1 2 5 7
0 1 3 4 
If the row-echelon form  
contains a row that 0 0 0 1
represents the equation 0 = c
where c is not zero, the 
system has no solution.
Last equation
A system with no solution says 0  1.
is called inconsistent
Solution of the System

One solution: 1 6 1 3 
0 1 2 2
If each variable in the row-

0 0 1 8 
echelon form is a leading
variable, the system has exactly
one solution.
  
We find this by using back- Each variable is a
substitution or Gauss-Jordan leading variable.
elimination.
Solution of the System

Infinitely many
solutions:  1 2 3 1
0 1 5 2
If the variables in the row-  
echelon form are not all leading 0 0 0 0 
variables, and if the system is
not inconsistent, it has infinitely 
many solutions.
z is not a leading
The system is called variable.
dependent.
Finding the Inverse of an nxn Matrix
For 3 x 3 and larger square matrices, the following technique
provides the most efficient way to calculate their inverses.

If A is an n x n matrix, we first construct the n x 2n matrix that has


the entries of A on the left and of the identity matrix In on the
right:

 a11 a12 a1n 1 0 0


a a a2n 
 21 22 0 1 0
 
 
an1 an 2 ann 0 0 1
Finding the Inverse of an nxn Matrix
We then use the elementary row operations on this new large
matrix to change the left side into the identity matrix.

This means that we are changing the large matrix to reduced


row-echelon form.

 a11 a12 a1n 1 0 0


a 
 21 a22 a2n 0 1 0
 
 
an1 an 2 ann 0 0 1
Finding the Inverse of an nxn Matrix

The right side is transformed automatically into A–1.

 a11 a12 a1n 1 0 0


a a a2n 
 21 22 0 1 0
 
 
an1 an 2 ann 0 0 1
Finding the Inverse of an nxn Matrix

Example: Let A be the matrix

 1 2 4 

A   2 3 6 
 3 6 15 

(a) Find A–1.


(b) Verify that AA–1 = A–1A = I3.
Finding the Inverse of an nxn Matrix

Begin with the 3 x 6 matrix whose left half is A and whose right
half is the identity matrix.

 1 2 4 1 0 0 
 2 3 6 0 1 0 
 
 3 6 15 0 0 1

Then transform the left half of this new matrix into the
identity matrix—by performing the following sequence
of elementary row operations on the entire new matrix.
Finding the Inverse of an nxn Matrix

 1 2 4 1 0 0 
R2  2R1 R2
  0 1 2 2 1 0 
R3  3R1 R3  
0 0 3 3 0 1

 1 2 4 1 0 0 
 0 2 2 1 0 
1R

3 3
1
 
0 0 1 1 0 31 
Finding the Inverse of an nxn Matrix

 1 0 0 3 2 0 
R1  2R2 R1
  0 1 2 2 1 0 
 
0 0 1 1 0 31 

 1 0 0 3 2 0
R2  2R3 R2
   0 1 0 4 1  32 
 
0 0 1 1 0 3
1

Finding the Inverse of an nxn Matrix

 1 2 4 

A   2 3 6 
 3 6 15 

 3 2 0 
1  2
A   4 1  3 
 1 0 1
3
Finding the Inverse of an nxn Matrix
Calculate AA–1 and A–1A, and verify that both products give the
identity matrix I3.

 3 2 0   1 2 4   1 0 0 
A1A   4 1  32   2 3 6   0 1 0 
 1 0 1
3
3 6 15  0 0 1

 1 2 4   3 2 0  1 0 0
AA1   2 3 6   4 1  32   0 1 0 
 3 6 15   1 0 1
3
0 0 1

You might also like