Vous êtes sur la page 1sur 47

Section Two: Matrices

Textbook: 1.3 (part), 1.4, 1.7


GOALS OF THIS CHAPTER
- transferring linear systems to matrix form

- recognizing matrices in row echelon form (REF) and reduced row echelon form (RREF)
- using elementary row operations to do Gauss-Jordan or Gaussian elimination - see relationships between a homogeneous system and its associated non-homogeneous system

LINEAR SYSTEMS IN MATRIX FORM


Consider a system of m equations in n unknowns:

a11x1 + a12x2 + + a1nxn = b1 a21x1 + a22x2 + + a2nxn = b2 . . . . . . . . . . . . am1x1 + am2x2 + + amnxn = bn

If we highlight all the coefficients of the xs, w can put these numbers into an mxn matrix!

LINEAR SYSTEMS IN MATRIX FORM


This matrix is known as the coefficient matrix of the linear system.

a11 a21

a12 a22

a1n a2n

A=

am1 am2

amn

LINEAR SYSTEMS IN MATRIX FORM

a11x1 + a12x2 + + a1nxn = b1 a21x1 + a22x2 + + a2nxn = b2 . . . . . . . . . . . . am1x1 + am2x2 + + amnxn = bn

Next, we can highlight all the xs and the bs.

LINEAR SYSTEMS IN MATRIX FORM


We generally write the xs and bs as column matrices. These column matrices are called the x-vector (or vector of unknowns) and the constant vector (or vector of constants). b1 b2 x1 x2

b=

bn

x=

xn

Since these column matrices are special, we use a bold-faced letter x or b (sometimes you may see the x or b underlined).

LINEAR SYSTEMS IN MATRIX FORM


Using these three pieces, we use matrix multiplication to express the system in matrix form: Ax = b.

a11 a21

a12 a22

a1n a2n

x1 x2

b1 b2

am1 am2

amn

xn

bn

We can re-capture the linear system by multiplying (you should double-check that Im not lying to you! ).

LINEAR SYSTEMS IN MATRIX FORM


Finally, we can join the constant vector b to the right side of A to create the augmented matrix [A|b].

a11 a21 am1

a12 a22

a1n a2n

b1 b2 bn

am2

amn

We divide the two pieces by placing a line between them. This line also acts like an equal sign (as we will see later).

LINEAR SYSTEMS IN MATRIX FORM


Ex. 1: Transferring to Matrix Form

-2x + z = 5 2x + 3y 4z = 7 3x + 2y + 2z = 3
The coefficient matrix is:

-2

A=

2
3

3
2

-4
2

LINEAR SYSTEMS IN MATRIX FORM


Ex. 1: Transferring to Matrix Form

-2x + z = 5 2x + 3y 4z = 7 3x + 2y + 2z = 3
The augmented matrix is:

-2

[A|b] =

2
3

3
2

-4
2

7
3

LINEAR SYSTEMS IN MATRIX FORM


Ex. 1: Transferring to Matrix Form

-2x + z = 5 2x + 3y 4z = 7 3x + 2y + 2z = 3
Finally, we can write in matrix form Ax=b: x y z 5

-2

2
3

3
2

-4
2

7 3

REDUCED ROW ECHELON FORM


Next, we talk about some special forms of mxn matrices.

Matrices in Reduced Row Echelon Form (RREF) satisfy the following conditions:
(1) Any row of complete zeros must be at the bottom of the matrix. (2) The first non-zero entry in a row (reading from left to right) must be a one. This one is called a leading one. (3) A leading one must be below and to the right of any leading one above it. (4) Any column containing a leading one must have only zeros as its other entries.

REDUCED ROW ECHELON FORM


Ex. 2 RREF Matrices

I=

1
0

0
1 1 0 0 0 0 1 0 0 0 0 1 0

2 0 0

0 1 0

0 3 0

A
4 -2 7 0

0 0

B=

The following matrices are all in RREF. Notice that the leading ones follow a step pattern!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

1 0 0 0

0 1 1 0

3 -2 2 0

4 5 2 0

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

REDUCED ROW ECHELON FORM


Ex. 3 Why are the following not RREF?

C=

1 2 0 4 0 0 0 0 0 0 1 -3
Fails (1)

Fails (4)

F=

1 0 3 4 0 2 -2 5 0 0 1 2
Fails (2)

Notice the steep step!

ROW ECHELON FORM

Matrices in Row Echelon Form (REF) satisfy the following conditions:


(1) Any row of complete zeros must be at the bottom of the matrix. (2) The first non-zero entry in a row (reading from left to right) must be a leading one. (3) A leading one must be below and to the right of any leading one above it. Notice that (4) is not on this list! This means any matrix in RREF is automatically in REF!

ROW ECHELON FORM


Ex. 4 REF Matrices

2 0 0

-1 3 1 0 -7 0

1
0

0
1

0 0

(Since I is in RREF, it is automatically in REF.)

B=

1 0 0

4 1 0

7 -2 1

The following matrices are all in REF. Notice that the leading ones still follow the step pattern!

ROW ECHELON FORM


What is the main difference between REF and RREF?

2 0 0
REF

-1 3 1 0 -7 0

2 0 0

0 1 0
RREF

3 -7 0

0 0

0 0

REF matrices do not need to have zeros above the leading ones. They will have zeros under the leading ones like RREF, though!

ELEMENTARY ROW OPERATIONS


When given a linear system it is often easier to solve the system using matrices. Using matrices is neater, more efficient and easier than doing elimination steps (all those arrows can be a pain). When working with matrices, we generally do not start in REF or RREF, but we would like to get to REF or RREF! Two main methods we learn in this chapter: Gaussian Elimination reduces a matrix to REF, and Gauss-Jordan Elimination reduces a matrix to RREF.

ELEMENTARY ROW OPERATIONS


Recall our three elimination steps. We could interchange equations, multiply an equation by a non-zero number or add a multiple of one equation to another. When working with linear systems in matrix form we can: (1) Interchange any two rows. (2) Multiply all entries in a row by a non-zero number.

(3) Add (or subtract) a multiple of one row to (or from) another row.
We call these elementary row operations instead of elimination steps.

ELEMENTARY ROW OPERATIONS


Ex. 5 Elementary Row Operations

1 0

2 0

2 0

1 0
R2 R3 =

1 0

2 0

2 2

1 -4

-4

Switching row two and three. Two switched with three.

ELEMENTARY ROW OPERATIONS


Ex. 5 Elementary Row Operations

1 0

2 0

2 0

1 0
= R3 R3 / 2

1 0

2 0

2 0

1 0

-4

-2

Multiplying row three by one half. Three goes to three over two.

ELEMENTARY ROW OPERATIONS


Ex. 5 Elementary Row Operations

1 0

2 0

2 0

1 0

R1

R1 R3 =

1 0

2 0

0 0

5 0

-4

-4

Subtracting row three from row one. One goes to one minus three.

GAUSSIAN ELIMINATION
We say that two matrices A and B are row equivalent if we can do any number of elementary row operations to get from A to B.

Thm. 6 Every mxn matrix A is row equivalent to a matrix in row echelon form (REF). Proof We will not prove, but I will give you the steps to find the row echelon form of A! Procedure done on overhead

GAUSSIAN ELIMINATION
Ex. 7 Using Gaussian Elimination Solve the following system by using Gaussian Elimination. 2x - y + z = 3 x 3y + z = 4 -5x 2z = -5

2 1

-1 1 -3 1

3 4

R1

R2 You dont always have to follow the steps. Here it is easier to switch the rows to get a leading one!

-5 0

-2 -5

GAUSSIAN ELIMINATION
Ex. 7 Using Gaussian Elimination

1
~

-3 1

-1 1

R2

R2 2*R1

Next, we focus on getting the entries under the leading one to be zero.

-5 0 1
~

-2 -5 4

-3 1 5

-1 -5 -2 -5
R3 R3 + 5*R1

-5 0

GAUSSIAN ELIMINATION
Ex. 7 Using Gaussian Elimination

1 -3 1 4 0 5 -1 -5 0 -15 3 15 1 -3 1 -15 1 4

R2

R2 / 5

All entries under the first leading one are zero, so we find a candidate for a leading one in second column.

0 0

-1/5 -1 3 15
R3

Next, we focus on getting the entries under the leading one to be zero.

R3 + 15*R2

GAUSSIAN ELIMINATION
Ex. 7 Using Gaussian Elimination

1
~

-3 1 0

0 0

-1/5 -1 0 0

There is no candidate for a leading one in the third column (since all entries are zero). We are done the elementary row operations.

x - 3y + z = 4 y z/5 = -1

Use the entries in the matrix to write down the new linear system. You may have to use back substitution to solve. Notice that the line acts like the equal sign!

GAUSSIAN ELIMINATION
Ex. 7 Using Gaussian Elimination

1
~

-3 1 0

0 0

-1/5 -1 0 0

Any variable matching up with a leading one is called a leading variable. We keep these variables on the left side of the equal sign always.

x - 3y + z = 4 y z/5 = -1

To finish up this example, move everything else over to the right and create the parameter.

GAUSSIAN ELIMINATION
Ex. 7 Using Gaussian Elimination

x = 4 + 3y - z y = -1 + z/5 x = 4 + 3(-1 + z/5) - z y = -1 + 1/5 z x = 1 2z/5 y = -1 + z/5

Any variable that is not a leading variable (in this example it is z) becomes a parameter in our solution.

Let z = t, where t is a real number.

Solution set is {x = 1 2t/5, y = -1 + t/5, z = t}. Solution is consistent and infinite.

GAUSS-JORDAN ELIMINATION
Gauss-Jordan elimination is very similar to Gaussian elimination. The major advantage of this process is we can just read the solution off the final matrix we will not need to use back substitution. Thm. 8 Every mxn matrix A is row equivalent to a matrix in reduced row echelon form (RREF). Proof Again, we will not prove, but I will give you the steps needed to find the reduced row echelon form of A. Procedure done on overhead

GAUSS-JORDAN ELIMINATION
All of our work points us to this important result:

Thm. 9 Let Ax = b and Cx = d be two linear systems of m equations in n unknowns. If the augmented matrices [A|b] and [C|d] are row equivalent, then the two systems have the same solution.
Proof not required

What does this mean?! Well, we can take any system Ax = b, and write the augmented matrix [A|b]. Using Gauss-Jordan elimination (or Gaussian elimination), we get to a new RREF (or REF) matrix [C|d]. The linear system Cx = d has the same solution as Ax = b and is easier to solve!

HOMOGENEOUS SYSTEMS
A homogeneous system is a linear system where all the constant terms are equal to zero.

a11x1 + a12x2 + + a1nxn = 0 a21x1 + a22x2 + + a2nxn = 0 . . . . . . . . . . . . am1x1 + am2x2 + + amnxn = 0

Instead of Ax = b, we write Ax = 0. Here, 0 is the column matrix with n entries of zero.

HOMOGENEOUS SYSTEMS
Recall that this type of system always has the solution x1 = x2 = = xn = 0. So it is impossible for these systems to have no solution.

a110 + a120 + + a1n0 = 0 a210 + a220 + + a2n0 = 0 . . . . . . . . . . . . am10 + am20 + + amn0 = 0

All equations are satisfied!

The solution set {x1 = 0, x2 = 0, , xn = 0} is called the trivial solution.

HOMOGENEOUS SYSTEMS
It is possible for these systems to have more than just the trivial solution. If a homogeneous system has an infinite solution set, then we call the solution non-trivial. This non-trivial solution always includes the trivial solution as one possibility (choose t = 0). An example to clarify: If our solution set to a homogeneous system was {x = t, y = -2t, z = t}, we call this infinite solution non-trivial since it is not {x = 0, y = 0, z = 0}. BUT, if we were to choose t = 0, then we would get the trivial solution!

HOMOGENEOUS SYSTEMS

Ex. 10 A Trivial Solution - done on overhead

Ex. 11 A Non-trivial Solution - done on overhead

HOMOGENEOUS SYSTEMS
REMARK! Recall that an underdetermined system cannot have a unique solution. This means any underdetermined and homogeneous system must have a non-trivial (infinite) solution! x - 3y + z = 0 6y z = 0
All constants are zero, so system is homogeneous.
There are more variables than equations, so the system is underdetermined. We should expect to see a non-trivial solution.

HOMOGENEOUS SYSTEMS
Ex. 12 Associated Homogeneous Systems

2x - y + z = 3 x 3y + z = 4 -5x 2z = -5
Non-homogeneous system

2x - y + z = 0 x 3y + z = 0 -5x 2z = 0
Associated homogeneous system

Every non-homogeneous system has a corresponding homogeneous system. If we solve the non-homogeneous system, we will get the solution to the homogeneous one for free!

HOMOGENEOUS SYSTEMS
Ex. 12 Associated Homogeneous Systems 2x - y + z = 3 x 3y + z = 4 -5x 2z = -5
find solution of non-homogeneous system {x = 1 2t/5, y = -1 + t/5, z = t} break off the piece with ts in it divide solution into a piece without ts and a piece with ts

2x - y + z = 0 x 3y + z = 0 -5x 2z = 0
this is solution set of the corresponding homogeneous system {x = - 2t/5, y = t/5, z = t}

{x = 1 , y = -1 , z = 0} + {x = - 2t/5, y = t/5, z = t}

HOMOGENEOUS SYSTEMS
But how does this all work? Here is the theory behind the magic: Thm. 13 Let x1 and x2 be solutions of the non-homogeneous system Ax=b. Then the difference x1 - x2 is a solution of the associated homogeneous system Ax=0. Proof :

A(x1 x2) = Ax1 Ax2 = b b = 0

HOMOGENEOUS SYSTEMS
But how does this all work? Here is the theory behind the magic: Cor. 14 Let x be a particular solution of the non-homogeneous system Ax=b, and let y be another solution of Ax=b. Then there exists a solution h to the associated homogeneous system Ax=0, such that y = x + h. Proof : Use Thm. 13 to our advantage! If we let h = y x, then we know h will solve Ax = 0 by Thm. 13. Solving for y, we get y = x + h.

Carl Friedrich Gauss (1777 - 1855)


There are a lot of good math history stories (some are even better than the drama on Jersey Shore!). It is my goal to tell you some of the ones that pertain to the math you will see in MATH 1310. -German mathematician

-known as the Prince of Mathematicians


-was a boy genius; supposedly in preschool he was told to add the numbers from 1 to 100 when he got in trouble

-he was able to do it in a matter of seconds! you may want to start adding now in case I get you in trouble this semester

Carl Friedrich Gauss (1777 - 1855)


-had two wives; first one died and he became very depressed

-apparently she died while he was trying to solve a problem and he told her to wait a moment until he was done
-married his wives best friend; this was his second wife -was jerk to his sons; he didnt want any of his three sons going into math or science since they would soil Guass name -Gaussian elimination actually originated somewhere in China! Isaac Newton (1643 - 1727) published the method in Europe -it was given Guass name in the 1950s because there was argument over the history of the algorithm

Vous aimerez peut-être aussi