Lecture1 Linear

You might also like

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

Lecture 1

Systems of Linear Equations


- Matrices

1.1 Introduction to Systems of Linear Equations


1.2 Gaussian Elimination and Gauss-Jordan Elimination

1.1 Introduction to Systems of Linear Equations

a linear equation in n variables:

a1, a2, a3,…, an, b: real numbers – ai coefficient xi variable or


unknown
a1: leading coefficient – pivot if non-zero
x1: leading variable or unknown
n Notes:

(1) Linear equations have no products or roots of variables and


no variables involved in trigonometric, exponential, or
logarithmic functions.

(2) Variables appear only to the first power.

1
Ex 1: (Linear or Nonlinear)
1
Linear ( a ) 3x + 2 y = 7 (b) x + y - p z = 2 Linear
2

p
Linear ( c ) x1 - 2 x2 + 10 x3 + x4 = 0 ( d ) (sin ) x1 - 4 x2 = e 2 Linear
2
Exponential
Nonlinear ( e) xy + z = 2 ( f ) ex - 2 y = 4 Nonlinear
Product of variables
1 1
Nonlinear ( g ) sinx1 + 2 x2 - 3x3 = 0 (h) + = 4 Nonlinear
x y
Trigonometric function not the first power

n a solution of a linear equation in n variables


a1 x1 + a2 x2 + a3 x3 + ! + an xn = b

is a set of n real numbers


x1 = s1 , x2 = s2 , x3 = s3 , !, xn = sn
such that a1s1 + a2 s2 + a3 s3 + ! + an sn = b

Solution set:
the set of all solutions of a linear equation

2
Ex 2: (Parametric representation of a solution set)
x1 + 2 x2 = 4
a solution: (2, 1), i.e. x1 = 2, x2 = 1

If you solve for x1 in terms of x2, you obtain


x1 = 4 - 2 x2 ,
By letting x2 = t you can represent the solution set as
x1 = 4 - 2t
And the solutions are {( 4 - 2t , t ) | t Î R} or {( s, 2 - 12 s ) | s Î R}

A system of m linear equations in n variables:


ì a11 x1 + a12 x2 + ! + a1n xn = b1
ï a x + a x +!+ a x = b
ï 21 1 22 2 2n n 2
í
ï "
ïîam1 x1 + am 2 x2 + ! + amn xn = bm

To solve the system of linear equations is to find all set of n real


numbers x1 = s1 , x2 = s2 , x3 = s3 , !, xn = sn satisfying all
equations of the system at the same time – called solution.

n Consistent:
A system of linear equations has at least one solution.
n Inconsistent:
A system of linear equations has no solution.

3
Notes:

Every system of linear equations has either


(1) exactly one solution,
(2) infinitely many solutions, or
(3) no solution.

Ex 4: (Solution of a system of linear equations)


(1) x + y = 3
x - y = -1 exactly one solution
two intersecting lines
(2) x + y = 3
2x + 2 y = 6 Infinitely many
two coincident lines solutions
(3)
x + y = 3
x + y = 1 no solution
two parallel lines

4
Ex 5: (Using back substitution to solve a system in row echelon
form)
x - 2y = 5 (1)
y = -2 (2)

Sol: By substituting y = -2 into (1), you obtain


x - 2 ( -2 ) = 5
x = 1
The system has exactly one solution: x = 1, y = -2

Ex 6: (Using back substitution to solve a system in row echelon


form)
x - 2 y + 3z = 9 (1)
y + 3z = 5 (2)
z = 2 (3)
Sol: Substitute z = 2 into (2)
y + 3( 2) = 5
y = -1
and substitute y = -1 and z = 2 into (1)
x - 2( -1) + 3( 2) = 9
x = 1

The system has exactly one solution:


x = 1, y = -1, z = 2

10

5
Equivalent:
Two systems of linear equations are called equivalent
if they have precisely the same solution set.

n Notes:
Eliminations: use following operations on a system of
linear equations to produce an equivalent system.
(1) Interchange two equations.
(2) Multiply an equation by a nonzero constant.

(3) Add a multiple of an equation to another equation.

11

Ex 7: Solve a system of linear equations (consistent system)

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

Sol: (1) + (2) ® (2)


x - 2 y + 3z = 9
y + 3z = 5 (4)
2 x - 5 y + 5 z = 17

(1) ´ ( -2) + (3) ® (3)


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

12

6
(4) + (5) ® (5)
x - 2 y + 3z = 9
y + 3z = 5
2z = 4 (6)
(6) ´ 12 ® (6)
x - 2 y + 3z = 9
y + 3z = 5
z = 2

So the solution is x = 1, y = -1, z = 2 (only one solution)

13

Ex 8: Solve a system of linear equations (inconsistent system)

x1 - 3x2 + x3 = 1 (1)
2 x1 - x2 - 2 x3 = 2 (2)
x1 + 2 x2 - 3x3 = - 1 (3)

Sol: (1) ´ ( -2) + (2) ® (2)


(1) ´ ( -1) + (3) ® (3)
x1 - 3x2 + x3 = 1
5 x 2 - 4 x3 = 0 ( 4)
5 x 2 - 4 x3 = - 2 (5)

14

7
( 4) ´ ( -1) + (5) ® (5)
x1 - 3x2 + x3 = 1
5 x 2 - 4 x3 = 0
0 = -2 (a false statement)

So the system has no solution (an inconsistent system).

15

Ex 9: Solve a system of linear equations (infinitely many solutions)


x 2 - x3 = 0 (1)
x1 - 3 x3 = - 1 (2)
- x1 + 3 x2 = 1 (3)

Sol: (1) « ( 2)
x1 - 3 x3 = - 1 (1)
x 2 - x3 = 0 (2)
- x1 + 3 x2 = 1 (3)

(1) + (3) ® (3)


x1 - 3 x3 = - 1
x 2 - x3 = 0
3 x 2 - 3 x3 = 0 (4)

16

8
x1 - 3 x3 = -1
x2 - x3 = 0
Þ x2 = x3 , x1 = -1 + 3x3

Let x3 = t any real number

then x1 = 3t - 1,
x2 = t , tÎR
x3 = t ,
So this system has infinitely many solutions.

17

1.2 Gaussian Elimination and Gauss-Jordan Elimination


m✕n matrix: (m by n matrix)
é a11 a12 a13 ! a1n ù
ê a21 a22 a23 ! a2 n ú
ê a31 a32 a33 ! a3n ú m rows
ê " ú
ê ú
ë a m1 am 2am 3 ! amn û
n columns
n Notes:
(1) Every entry aij in a matrix is a number.
(2) A matrix with m rows and n columns is said to be of size m✕n .
(3) If m = n , then the matrix is called square of order n.
(4) For a square matrix, the entries a11, a22, …, ann are called
the main diagonal entries.

18

9
Ex 1: Matrix Size
[2] 1´ 1
é 0 0ù 2´2
êë0 0úû
é1 - 3 0 1 ù
êë 1´ 4
2 úû
é e p ù
ê2 2ú 3´ 2
êë - 7 4 úû
n Note:
One very common use of matrices is to represent a system
of linear equations.

19

a system of m equations in n variables:


a11 x1 + a12 x2 + a13 x3 + ! + a1n xn = b1
a21 x1 + a22 x2 + a23 x3 + ! + a 2 n xn = b2
a31 x1 + a32 x2 + a33 x3 + ! + a3n xn = b3
"
am1 x1 + a m 2 x2 + am 3 x3 + ! + amn xn = bm

Matrix form: Ax = b

é a11 a12 a13 ! a1n ù


ê a21 a22 a23 ! a2 n ú é x1 ù é b1 ù
ê ú ê ú
A = ê a31 a32 a33 ! a3n ú x = ê x2 ú b = ê b2 ú
ê ú ! !
" êë xn úû êëbm úû
ê ú
ë a m1 am 2 am 3 ! amn û

20

10
n Coefficient matrix:

é a11 a12 a13 ! a1n ù


ê a21 a22 a23 ! a2 n ú
ê a31 a32 a33 ! a3n ú = A
ê " ú
ê ú
ë a m1 am 2 am 3 ! amn û

n Augmented matrix:

é a11 a12 a13 ! a1n b1 ù


ê a21 a22 a23 ! a2 n b2 ú
ê a31 a32 a33 ! a3n b3 ú = [ A b]
ê " ú
ê ú
ë a m1 am 2 am 3 ! amn bm û

21

Elementary row operation:


(1) Interchange two rows. rij : Ri « R j
(2) Multiply a row by a nonzero constant. ri( k ) : ( k ) Ri ® Ri
(3) Add a multiple of a row to another row. r ( k ) : ( k ) R + R ® R
ij i j j

n Row equivalent:
Two matrices are said to be row equivalent if one can be obtained
from the other by a finite sequence of elementary row operation.

22

11
Ex 2: (Elementary row operation)

é 0 1 3 4ù r12 é - 1 2 0 3ù
ê - 1 2 0 3ú ê 0 1 3 4ú
êë 2 - 3 4 1úû êë 2 - 3 4 1úû

é2 - 4 6 - 2ù r1 2
(1)
é 1 - 2 3 - 1ù
ê 1 3 - 3 0ú ê 1 3 - 3 0ú
ëê 5 - 2 1 2úû ëê5 - 2 1 2úû

é 1 2 - 4 3ù r13( -2 ) é 1 2 - 4 3ù
ê 0 3 - 2 - 1ú ê0 3 - 2 - 1ú
êë2 1 5 - 2úû êë0 - 3 13 - 8úû

23

Ex 3: Using elementary row operations to solve a system


Linear System Associated Elementary
Augemented Matrix Row Operation

x - 2 y + 3z = 9 é 1 -2 3 9ù
- x + 3y = -4 ê- 1 3 0 - 4ú
ê ú
2 x - 5 y + 5z = 17 êë 2 - 5 5 17 úû

x - 2 y + 3z = 9 é 1 - 2 3 9ù
ê0 r12(1) : (1) R1 + R2 ® R2
y + 3z = 5 1 3 5ú
ê ú
2 x - 5 y + 5 z = 17 êë2 - 5 5 17 úû

x - 2 y + 3z = 9 é 1 - 2 3 9ù
ê0 1 3 5úú r13( -2 ) : (-2) R1 + R3 ® R3
y + 3z = 5 ê
- y - z = -1 êë0 - 1 - 1 - 1úû

24

12
Associated Elementary
Linear System Augemented Matrix Row Operation

x - 2 y + 3z = 9 é 1 - 2 3 9ù r23(1) : (1) R2 + R3 ® R3
ê0 1 3 5ú
y + 3z = 5 ê ú
2z = 4 êë0 0 2 4úû

x - 2 y + 3z = 9 é 1 - 2 3 9ù 1
( ) 1
ê0 1 3 5ú r3 2 : ( ) R3 ® R3
y + 3z = 5 ê ú 2
z = 2 ëê0 0 1 2ûú

x = 1
y = -1
z = 2

25

A matrix is of row-echelon form if it satisfies (1), (2), (3)


A matrix is of reduced row-echelon form if it satisfies (1), (2),
(3) and (4)
(1) All row consisting entirely of zeros occur at the bottom
of the matrix.
(2) For each row that does not consist entirely of zeros,
the first nonzero entry is 1 (called a leading 1).
(3) For two successive (nonzero) rows, the leading 1 in the higher
row is farther to the left than the leading 1 in the lower row.
(4) Every column that has a leading 1 has zeros in every position
above and below its leading 1.

26

13
Ex 4: (Row-echelon form or reduced row-echelon form)
é 1 2 - 1 4ù (row - echelon é0 1 0 5ù (reduced row -
ê0 1 0 3ú ê0 0 1 3ú
êë0 0 1 - 2úû form) êë0 0 0 0úû echelon form)

é 1 - 5 2 - 1 3ù é1 0 0 - 1ù
ê0 0 1 3 - 2ú (row - echelon ê0 1 0 2ú (reduced row -
ê0 0 0 1 4ú form) ê0 0 1 3ú echelon form)
ëê0 0 0 0 1ûú êë0 0 0 0úû

é 1 2 - 3 4ù é 1 2 - 1 2ù
ê0 2 1 - 1ú ê 0 0 0 0ú
ëê0 0 1 - 3ûú ëê0 1 2 - 4ûú

27

Gaussian elimination:
The procedure for reducing a matrix to a row-echelon form.
Gauss-Jordan elimination:
The procedure for reducing a matrix to a reduced row-echelon
form.
n Notes:
(1) Every matrix has an unique reduced row echelon form.

(2) A row-echelon form of a given matrix is not unique.


(Different sequences of row operations can produce
different row-echelon forms.)

28

14
Ex: (Procedure of Gaussian elimination and Gauss-Jordan elimination)
Produce leading 1
⎡ 0 0 −2 0 8 12 ⎤ ⎡ 2 8 −6 4 12 28 ⎤
⎢ ⎥ r12 ⎢ ⎥
⎢ 2 8 −6 4 12 28 ⎥ ⎢ 0 0 −2 0 8 12 ⎥
⎢⎣ 2 8 −1 4 −5 4 ⎥⎦ ⎢⎣ 2 8 −1 4 −5 4 ⎥⎦
The first nonzero column

leading 1 Produce leading 1


r
( 12 ) ⎡ 1 4 −3 2 6 14 ⎤ r ( -2 ) é1 4 - 3 2 6 14ù
1 ⎢ ⎥ 13 ê0 0 - 2 0 8 12ú
⎢ 0 0 −2 0 8 12 ⎥ ê ú
⎢⎣ 2 8 −1 4 −5 4 ⎥⎦ êë0 0 5 0 - 17 - 24úû
Zeros elements below leading 1 The first nonzero Submatrix
column

29

leading 1
( - 12 ) é1 4 - 3 2 6 14ù
r23( -5) éê
1 4 -3 2 6 14ù
r ê0 0
2
1 0 - 4 - 6ú 0 0 1 0 - 4 - 6ú
ê ú ê ú
êë0 0 5 0 - 17 - 24úû êë0 0 0 0 3 6úû
Zeros elements below leading 1 Submatrix
Produce leading 1
Zeros elsewhere
1
r3 3
( )
é1 4 - 3 2 6 14ù r31( -6 ) é1 4 - 3 2 0 2ù
ê0 0 ê0 0 1 0 - 4 - 6ú
1 0 - 4 - 6ú ê ú
ê ú
êë0 0 0 0 1 2úû ëê0 0 0 0 1 2ûú
leading 1 (row - echelon form)
(row - echelon form)

r32( 4 ) é 1 4 - 3 2 0 2ù é 1 4 0 2 0 8ù
ê0 0 r21(3)
1 0 0 2ú ê0 0 1 0 0 2 ú
ê ú ê ú
ëê0 0 0 0 1 2ûú êë0 0 0 0 1 2úû
(row - echelon form) (reduced row - echelon form)

30

15
Ex 7: Solve a system by Gauss-Jordan elimination method
(only one solution)
x - 2 y + 3z = 9
- x + 3y = -4
2 x - 5 y + 5 z = 17
Sol:
augmented matrix
é 1 - 2 3 9ù r12(1) , r13( -2 ) é 1 - 2 3 9ù r23(1) é 1 - 2 3 9ù
ê0
ê - 1 3 0 - 4ú ê0 1 3 5úú ê 1 3 5úú
ê
êë 2 - 5 5 17úû êë0 - 1 - 1 - 1úû êë0 0 2 4úû
1
( ) ( 2) ( -3) ( -9 )
r 3
2
é 1 - 2 3 9ù r21 , r32 , r31 é 1 0 0 1ù x = 1
ê0 1 3 5ú ê0 1 0 - 1ú y = -1
ëê 0 0 1 2 úû ëê0 0 1 2ûú z = 2
(row - echelon form) (reduced row - echelon form)

31

Ex 8:Solve a system by Gauss-Jordan elimination method


(infinitely many solutions)
2 x1 + 4 x1 - 2 x3 = 0
3x1 + 5 x2 = 1
Sol: augmented matrix
( 12 )
é 2 4 - 2 0 ù r1 , r12( -3) , r2( -1) , r21( -2 ) é 1 0 5 2ù (reduced row -
êë 3 5 0 1úû êë0 1 - 3 - 1úû echelon form)

the corresponding system of equations is


x1 + 5 x3 = 2
x2 - 3 x3 = - 1
leading variable:x1 , x2
free variable: x3

32

16
x1 = 2 - 5 x3
x 2 = - 1 + 3 x3
Let x3 = t
x1 = 2 - 5t ,
x2 = -1 + 3t , tÎR
x3 = t ,

So this system has infinitely many solutions.

33

Homogeneous systems of linear equations:


A system of linear equations is said to be homogeneous
if all the constant terms are zero.

a11 x1 + a12 x2 + a13 x3 + ! + a1n xn = 0


a21 x1 + a22 x2 + a23 x3 + ! + a2 n xn = 0
a31 x1 + a32 x2 + a33 x3 + ! + a3n xn = 0
"
am1 x1 + am 2 x2 + am 3 x3 + ! + amn xn = 0

34

17
Trivial solution:
x1 = x2 = x3 = ! = xn = 0

n Nontrivial solution:
other solutions
n Notes:
(1) Every homogeneous system of linear equations is consistent.
(2) If the homogenous system has fewer equations than variables,
then it must have an infinite number of solutions.
(3) For a homogeneous system, exactly one of the following is true.
(a) The system has only the trivial solution.
(b) The system has infinitely many nontrivial solutions in
addition to the trivial solution.

35

Ex 9: Solve the following homogeneous system


x1 - x2 + 3 x3 = 0
2 x1 + x2 + 3 x3 = 0
Sol: augmented matrix
(1)
é 1 - 1 3 0ù r12( -2 ) , r2 3 , r21(1) é 1 0 2 0ù (reduced row -
êë2 1 3 0úû êë0 1 - 1 0úû echelon form)
leading variable:x1 , x2
free variable: x3
Let x3 = t
x1 = -2t , x2 = t , x3 = t , t Î R
When t = 0, x1 = x2 = x3 = 0 (trivial solution)

36

18

You might also like