Upload
others
View
11
Download
0
Embed Size (px)
Citation preview
ENGR-1100 Introduction to Engineering Analysis
Lecture 5Notes courtesy of: Prof. Yoav Peles
Important Information!
• Exam No. 1 covers Lectures 1-5 in Syllabus !
Lecture outline(Linear Algebra today)
• Introduction to linear equations• Gauss-Jordan elimination method
Introduction to system of linear equations
a1x + a2y = b
• a1x1 + a2x2 +….+anxn = b• a1x + a2y + a3z =b
x
y
z
Which of the following are linear equations?
a) x + 3y = 7b) x1 - 3x2 + 5x3 = cos(10)
c) x1 + sin x2 = b
d) a1x12 + a2x2 +….+ anxn = b
Answer: a, b
System of linear equations• A finite set of linear equations in the
variables x1, x2,.. xn is called a system of linear equations. A sequence of numbers s1, s2,.. sn is called a solution of the system if x1=s1, x2=s2,.. xn=sn , is a solution of every equation in the system. For example:
4x1 - x2 + 3x3 = -1
3x1 + x2 + 9x3 = -4
has the solution x1 = 1, x2 = 2, x3 = -1.
No solution- inconsistent
• The following set of linear equations has no solution
x + y = 3x + y = 4
If there is at least one solution, it is called consistent.
Three possibilities
No solution 1 solution Infinite solutions
y
x
l1 l2y
x
l1and l2y
x
l1
l2
Augmented matrix
x1 +3 x2 + 4x3 = 8
2x1 + 5x2 - 8x3 = 1
3x1 + 7x2 - 9x3 = 0
1 3 4 8
2 5 –8 1
3 7 –9 0
Class assignment problem
Find a system of linear equations corresponding to the following augmented matrix, assuming the variables are x, y, and z
1 0 -1 2
2 1 1 3
0 -1 2 4
Class assignment solution
Find a system of linear equations corresponding to the following augmented matrix, assuming the variables are x, y, and z
4 2z y -
3 z y 2x
2 z -x
4
3
2
210
112
101
Basic method for solving a system of linear equations• Replace the given system by a new
system that has the same solution set, but is easier to solve:
1) Multiply a row through by a nonzero constant.
2) Interchange two rows.3) Add a multiple of one row to another.a11 a12 …a1n b1
a21 a22 …a2n b2
a31 a32 …a3n b3
: : : :
an1 an2 …ann bn
1 0 … 0 b’1
0 1 … 0 b’2
0 0 … 0 b’3
: : : :
0 0 … 1 b’n
Examplex+y+2z = 9
2x+4y-3z = 1
3x+6y-5z = 0
1 1 2 9
2 4 -3 1
3 6 -5 0
*-2*-2++
x+y+2z=9
2y-7z=-17
3x+6y-5z=0
1 1 2 9
0 2 -7 -17
3 6 -5 0
*-3*-3
+ +
x+y+2z=9
2y-7z=-17
3y-11z=-27
1 1 2 9
0 2 -7 -17
0 3 -11 -27
*1/2 *1/2
Example-continued
1 1 2 9
0 1 –7/2 –17/2
0 3 -11 -27
x+y+2z=9
y-7/2z=-17/2
3y-11z=-27+
*-3*-3+
x+y+2z=9
y-7/2z=-17/2
-1/2z=-3/2
1 1 2 9
0 1 –7/2 –17/2
0 0 –1/2 –3/2
x +11/2z=35/2
y-7/2z=-17/2
-1/2z=-3/2
1 0 11/2 35/2
0 1 –7/2 –17/2
0 0 –1/2 –3/2
*-1*-1++
*-2 *-2
Example-continuex+y+2z=9
y-7/2z=-17/2
z=3
x =1
y-7/2z=-17/2
z=3
1 0 0 1
0 1 –7/2 –17/2
0 0 1 3
*-11/2
+ +*-11/2
x = 1
y = 2
z = 3
1 0 0 1
0 1 0 2
0 0 1 3
1 0 11/2 35/2
0 1 –7/2 –17/2
0 0 1 3
* 7/2 * 7/2 ++
Gauss-Jordan elimination
• A systematic procedure for solving system of linear equations by transforming the augmented matrix to a reduced row-echelon form
1 0 0 2
0 1 0 3
0 0 1 1
x = 2
y = 3
z = 1
Reduced row-echelon form
Reduced row-echelon form1) If a row does not consist entirely of zeros,
then the first nonzero number in the row is a 1 (leading 1).
2) If there are any rows that consist entirely of zeros, then they are grouped together at the bottom of the matrix.
3) In any two successive rows that do not consist entirely of zeros, the leading 1 in the lower row occurs farther to the right than the leading 1 in the higher row.
4) Each column that contains a leading 1 has zeros everywhere else.
1 0 0 2
0 1 0 3
0 0 1 1
x = 2
y = 3
z= 1
Reduced row-echelon form
Solve the following reduced-echelon form matrices
1 0 0 5
0 1 0 -2
0 0 1 4
a) 1 0 0 4 -1
0 1 0 2 6
0 0 1 3 2
b)
c) 1 0 0 0
0 1 2 0
0 0 0 1
Gauss-Jordan elimination
• A systematic procedure for solving system of linear equations by transforming the augmented matrix to a reduced row-echelon form
Class assignment problemFor the following system of linear equations:
Write down the equations in the augmented formUse G-J elimination method to determine the RREFDetermine the solution for that system
Class assignment solution
1 z
1- y
2 x
1
1
2
100
010
001
R
2R
1
2
0
100
110
201
7/
7
2
0
700
110
201
8R
2R-
23
2
4
1580
110
421
3R-
2R-
11
10
4
323
952
421
3
3
2
2
1
1