Docsity

Direct Methods for Solving Linear Systems - Lecture Slides | MATH 215, Study notes of Linear Algebra

Partial preview of the text

Download Direct Methods for Solving Linear Systems - Lecture Slides | MATH 215 and more Study notes Linear Algebra in PDF only on Docsity!

Math 215: Introduction to Linear Algebra

Section 2.2: Direct Methods for Solving Linear

Systems^ Paul Dostert

September 26, 2008

Matrices and Row Echelon Form

For a linear system, the

coefficient matrix

contains the coefficients of the

variables, and the

augemented matrix

is the same, but with an extra

column containing the constant terms. We usually denote the coefficientmatrix by

A

, the constant vector by

b^

and the variable matrix as

x. The

augmented matrix is denoted by

[A

|b]

A matrix is in

row echelon form

if

(a)

Any rows with all zeros are at the bottom. (b)

The leading entry in each nonzero row is in a column to the left of therows below it. Ex

: The following are in row echelon form:

−^3

−^4

−^3

−^9

 ^ ,

−^6

Gaussian Elimination

When reducing to row echelon form you should attempt to

zero out

each

lower diagonal entry starting with the first column until finished. To do this,you should always move a row with a nonzero entry on the diagonal. Ex

: Solve the following systems by GE

−^3

−^2

 ^ ,

−^2

−^4

−^2

−^2

−^4

If we apply GE to a system with inifinitely many solutions, then we have the leading variables

in terms of the other

free variables

which can be any

value. In a consistent system, the free variables are the non leadingvariables. For:

y^ +

z^

+^

w^

+^

x^

=^

z^ + 2

w^

=^

x^

=^

The leading variables would be

y,

z^

and

x. The free variable would be

w

Rank

The

rank

of a matrix is the number of nonzero rows in its row echelon form.

Thm:

Let

A

be the coefficient matrix of a system with

n^

variables. If the

system is consistent, then

number of free variables

n^

−^

rank

(A

)^.

Note: We will learn many other ways to determine and use the rank later.A matrix is in

reduced row echelon form (rref)

if it satisfies:

1.^

It is in row echelon form.

2.^

The leading entry in each nonzero row is

3.^

Each column containing a

has zero elsewhere.

The following are in

reduced

row echelon form:

 ^ ,

 ^ ,

Homogeneous Systems and Examples

A system of linear equations is

homogeneous

if each constant term is zero

(if the RHS is zero). Thm

: If

[A

|0]

is a system of

m

equations with

n^

variables with

m < n

then

the system has infinitely many solutions. Ex

: Find the intersection of the planes

x^

+^

y^ +

z^

,^2

x^ +

y^

−^

z^ = 0

and

x^ −

y^

+^

z^ = 0

Ex

: Find the intersection of the planes

x^

+^

y^ −

z^

and

x^

−^

2 y

z^

Ex

: A bakery has

different sizes of cupcakes, mini for

, regular for

and monster for

. The number of monster and regular cupcakes adds to

twice the number of mini cupcakes. If the company has

cupcakes worth

, then how many of each cupcake do they have?

Matlab

We’re going to jump ahead and bit an learn how to write and solve linearsystems as matrices. Suppose we have

−^2

−^3

−^1

−^2

In Matlab, we need to write the augmented matrix as the coefficient matrix,and a column vector containing the constants (the RHS vector). To write amatrix (or vector) we use brackets

[ ]

. A comma separates entries in a row,

and a semicolon indicates a move to a new row. Generally we refer to thematrix as

A

and the RHS vector as

b. The command

x^

=^

A\

b^ means solve

Ax

b^

for

x^

using Gaussian Elimination. We write:

» A = [4,6,-2 ; -3,8,11 ; -1,4,-2];» b = [0;4;11];» x = A

^

b;

This will only work correctly for uniquely solveable systems. Otherwise it willgive you a possible solution (if there are infinitely many solutions) or a ‘close’solution (if there are no solutions).