LADE7 Intro To Linear Equations

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Linear Algebra and Differential Equations

Lecture 7
Introduction to Linear Systems

June 22, 2016

Linear Algebra and Differential EquationsLecture 7Introduction to


June
Linear
22, Systems
2016

1/1

Linear algebra with one variable

An example
3x = 21

x =7

This has one solution. The equation


ax = b
has
one solution if a 6= 0
no solution if a = 0, b 6= 0
an infinite number of solutions if a = 0, b = 0

Linear Algebra and Differential EquationsLecture 7Introduction to


June
Linear
22, Systems
2016

2/1

Two variables
An example
x + 3y

= 2

3x y

= 14

To solve this subtract three times the first equation from the second
equation giving
x + 3y

= 2

10y

= 20

The second equation immediately gives y = 2, then substituting this into


the first equation gives x = 4.
This procedure is called Gaussian elimination.
Linear Algebra and Differential EquationsLecture 7Introduction to
June
Linear
22, Systems
2016

3/1

What can go wrong?


A linear equation in two variables represents a line in the x-y plane. The
solution of two simultaneous linear equations in two variables is the point
of intersection of the two lines. The lines will not intersect if they are
parallel (or are the same line).
ax + by

= e

cx + dy

= f

They will have no solution if the two LHS of the equations are proportional
a
b
=
c
d
unless a/c = b/d = e/f when the equations are identical and there is an
infinite number of solutions.
Linear Algebra and Differential EquationsLecture 7Introduction to
June
Linear
22, Systems
2016

4/1

Three equations with three unknowns


For example
3x + 5y + z
2x + 4y
y + 2z

= 0
= 2
= 3

We will use the same strategy (Gaussian elimination) as we did in the two
variable case. As a first move replace the first equation with the difference
between the first equation and the second equation.
x +y +z
2x + 4y
y + 2z

= 2
= 2
= 3

Linear Algebra and Differential EquationsLecture 7Introduction to


June
Linear
22, Systems
2016

5/1

To eliminate the x in the second equation replace the second equation by


the difference between it and twice the first equation.
x +y +z
2y 2z
y + 2z

= 2
= 6
= 3

Now if we replace the third equation by the sum of the second and third
equations
x +y +z

= 2

2y 2z

= 6

3y

= 3

the third equation immediately gives y=-1. Substituting this into the
second equation gives z=2. Substituting both of these into the first
equation gives x=1
Linear Algebra and Differential EquationsLecture 7Introduction to
June
Linear
22, Systems
2016

6/1

Matrices
Calculationally it is more efficient, and completely equivalent, to just work
with the numbers and have the variables understood. In our example we
would work with the augmented matrix

3 5 1 0
2 4 0 2
0 1 2 3
The array of coefficients

3 5 1
2 4 0
0 1 2
is called the coefficient matrix. The augmented matrix is obtained by
adding the constant vector as an extra column.
Linear Algebra and Differential EquationsLecture 7Introduction to
June
Linear
22, Systems
2016

7/1

Elementary Matrix Operations


When we manipulate the equations to solve them, the corresponding effect
on the augmented matrix is one of
Interchange a row
Multiply a row by a constant
Add a row to another row
these are called elementary row operations. Two matrices that can be
converted into one another by elementary row operations are called (row)
equivalent matrices. The solutions of two systems with equivalent
matrices are identical.
Gaussian elimination is a method of finding a simple augmented matrix ,
equivalent to the original matrix, which then is easily solved.

Linear Algebra and Differential EquationsLecture 7Introduction to


June
Linear
22, Systems
2016

8/1

Row Echelon Matrices

A row echelon matrix has the two properties


(a) Every row that consists of entirely of zeros is beneath any row that
contains a nonzero element
(b) In any row containing a nonzero element, the leading term (the
leftmost nonzero element) must lie strictly to the right of the leading
element of the row above it.
The object of Gaussian elimination is to reduce the given augmented
matrix to row echelon form, which then allows the solution of the system
to be read off.

Linear Algebra and Differential EquationsLecture 7Introduction to


June
Linear
22, Systems
2016

9/1

For example if the variables are


matrix

1
0

0
0

x1 , x2 , x3 , x4 the row echelon augmented

2 3 0 2
2 0 1 3

0 0 1 2
0 0 0 0

which corresponds to the equations


x1 + 2x2 + 3x3 = 2
2x2 x4 = 3
x4 = 2
gives the solution x4 = 2, x2 = 2.5, x1 = 3 3x3 . Note that we cant
solve for x3 because there is no leading term in the x3 column.

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 10 / 1

An example

2 1 1 4
3 4 2 11
3 2 4 11
First we aim for two zeros in the first column

2 1
1 4
R2 1.5R1 R2
= 0 5.5 0.5 5
R3 1.5R1 R3
0 0.5 5.5 5
now

(R2 R3 )/6 R2
2R3 R3

2 1 1 4
0 1 1 0
0 1 11 10

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 11 / 1

Finally we obtain the row echelon form

R2 + R3 R3

2 1 1 4
0 1 1 0
0 0 10 10

with the solution


x1 = 3
x2 = 1
x3 = 1

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 12 / 1

Reduced Row Echelon Form


A reduced row echelon matrix is an row echelon matrix which has all the
leading terms equal to one and all the other entries in the column
containing the leading term are zeros.
For example

1
0
0
0
0

0
1
0
0
0

3
5
0
0
0

0
0
1
0
0

0
0
0
1
0

0 4
0 6

0 3

0 0
1 8

with solution x1 = 4 3x3 , x2 = 6 5x3 , x4 = 3, x5 = 0, x6 = 8.


The advantage of reduced form is that the solutions are read off from the
table and we dont have to do any back substitution. Whether the extra
bother to calculate the reduced form is worth it is a matter of taste.
Linear Algebra and Differential EquationsLecture 7Introduction June
to Linear
22, 2016
Systems 13 / 1

An Example

2
3 1 12
4
1
2
19
6 5 3
24

2 3 1 12
R2 2R1 R2
43
= 0 5 4
R3 + 3R1 R3
0 4
0 12

2 3 1 12
R3 /4 R2
0
3
= 0 1
R2 R3
0 5 4
43

2 0 1 3
R1 3R2 R1
= 0 1 0 3
R3 + 5R2 R3
0 0 4 28
Linear Algebra and Differential EquationsLecture 7Introduction June
to Linear
22, 2016
Systems 14 / 1

2 0 1 3
R3 /4 R3 = 0 1 0 3
0 0 1
7

2 0 0 4
R1 + R3 R1 = 0 1 0 3
0 0 1 7

1 0 0 2
R1 /2 R1 = 0 1 0 3
0 0 1 7
and the solution to the original system is
x1 = 2

x2 = 3

x3 = 7

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 15 / 1

Homogeneous Equations
A homogeneous system is one where
Ax = 0
it always has the trivial solution x = 0. If A is an n n matrix and x is an
n 1 matrix then the system has only the trivial solution if A is row
equivalent to the matrix with 1s along the principal diagonal and zeros
everywhere else.
This matrix is called the n n identity matrix

1 0 0
0 1 0

I= . . .
. . ...
.. ..

0 0

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 16 / 1

An Example
Does the system of equations
2x1 3x2 + x3 = 0
4x1 + 4x2 3x3 = 0
2x1 x2 = 0
have a nontrivial

2 3
4 4
2 1

solution?

1
3
0

R2 2R1 R2
R3 R1 R3

2 3 1
0 10 5
0 2 1

R3 R2
R2 5R3 R3

2 3 1
0 2 1
0 0
0

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 17 / 1


R1 /2 R1
R2 /2 R2

1 1.5 0.5
0
1
0.5
0
0
0

Finally

R1 + 1.5R2 R1

1 0 0.25
0 1 0.5
0 0
0

is the reduced row echelon form. It isnt equivalent to the 3 3 identity


matrix and so the original system has the nontrivial solution
x1 = 0.25x3

x2 = 0.5x3

Linear Algebra and Differential EquationsLecture 7Introduction June


to Linear
22, 2016
Systems 18 / 1

You might also like