MA1101R LINEAR ALGEBRA Linear Systems & Gaussian Elimination Wang Fei
[email protected]
Department Department of Mathematics Mathematics Office: S17-06-16 Tel: 6516-2937
Introduction 2 Content. Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Assessment . Assessment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Linear Systems & Their Solutions Lines on the plane . plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linear Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions of a Linear System . System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linear System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Consistency . Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9 10 12 15 21 24 25
Elementary Row Operations Augmented Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Elementary Elementary Row Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Row Equivalent Matrices . Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32 33 35 40
Row-Echelon Row-Echelon Form Row-Echelon Form. . Form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reduced Row-Echelon Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solve Linear System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42 43 47 50
Gaussian Elimination Row Echelon Form. Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gaussian Elimination . Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gauss-Jordan Elimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Consistency . Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59 60 61 68 73 78
1
Geometric Geometric Interpretation Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Examples . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Homogeneous Linear Systems 102 Homogeneous Linear Equations & Systems Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Geometric Geometric Interpretation Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2
Geometric Geometric Interpretation Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Examples . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Homogeneous Linear Systems 102 Homogeneous Linear Equations & Systems Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Geometric Geometric Interpretation Interpretation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
2
2 / 111
Introduction What will we learn in Linear Algebra I? • Why Linear Algebra? ◦ Linear: • •
Study lines, lines, planes, and objects objects which are geometrically geometrically “flat”. “flat”. The real world is too complicated. We may (have to) use “flat” objects objects to approximate. approximate.
◦ Algebra: • •
The objects are not as simple simple as numbers. numbers. The operations are not limited limited to addition, subtraction, subtraction, multiplicati multiplication on and division. 3 / 111
What will we learn in Linear Algebra I? • Contents: Equations & Gaussian Gaussian Eliminati Elimination. on. ◦ Linear Equations • •
Solve linear systems in systematical ways. ways. Determine the number number of solutions. solutions.
◦ Matrices. • •
Definition and computations computations.. Determinant of square square matrices. matrices.
◦ Vector Spaces. • • • •
Euclidean spaces. Subspaces. Bases and Dimensions Dimensions.. Change of Bases. 4 / 111
3
What will we learn in Linear Algebra I? • Contents: ◦ Vector Spaces Associated with Matrices. •
Row Spaces, Spaces, Column Spaces Spaces and Null Spaces. Spaces.
◦ Orthogonality. • •
Dot Product. Orthogonal and Orthonormal Bases.
◦ Diagonalization. • • •
Eigenvalues and Eigenvectors. Diagonalization Diagonalization and Orthogonal Diagonalizat Diagonalization. ion. Quadratic Quadratic Forms Forms and Conic Sections. Sections.
◦ Linear Transformation. • •
Definition, Ranges and and Kernels. Kernels. Geometric Linear Transformations. 5 / 111
Workload and Assessment 1 .5 × 2 hours per week (week 1 to week 13); • Lecture: 1. ◦ Mondays & Thursdays 16:00 – 17:35, LT27 LT27 Lecturers: Wang Fei, matwf , S17-06-16, 6516 2937 ◦ Dr. Wang Tan, mattanv , S17-07-22, 6516 7936 ◦ A/P Victor Tan,
• Tutorial: 1 hour per week (week 3 to week 13); Registration Registration of tutorial group (13th –18th January): Students: CORS CORS balloting. balloting. ◦ NUS Students: Students: Manual registration registration (email me!). me!). ◦ Other Students: (MATLAB): 1 hour in week 4, 6, 8, 10, 12. • Lab Session (MATLAB): No registration for lab session. Mondays 11–13, Tuesdays 15–17, ◦ Mondays Wednesdays 15–17, Fridays Fridays 13–15. ◦ Wednesdays 6 / 111
4
Workload and Assessment • Course Materials Materials and Textboo Textbook: k: Materials: All are available available in IVLE. IVLE. ◦ All course Materials: ◦ Textbook: •
• • •
Linear Algebra (Concepts (Concepts and Technique Techniques s on Euclidean Spaces) 2nd edition, McGraw McGraw Hill, Ma, Ng, & Tan.
The book is availab available le in NUS COOP near LT27. LT27. Lectures will follow follow the textbook closely. closely. Exercises Exercises from the book will be used as tutorial tutorial questions.
7 / 111
Workload and Assessment • Homework Assignments: 4% × 4 times = 16%. ◦ Submit during during the lecture time: •
2nd Feb, eb,
13th 13t h Feb, eb,
13th 13t h Ma March rch,,
3rd April. April.
uploaded to IVLE. IVLE. ◦ Questions will be uploaded
• Lab Quiz: 4%. in-class quiz, quiz, conducted conducted in week 13. ◦ It is an in-class Registration for for quiz slot slot is required. ◦ Registration ◦ Details will be announced.
• Mid-Term Test:
20%.
lecture time, time, venue TBC. TBC. ◦ 2nd March, lecture covers the materials materials from tutorial tutorial 1–4. ◦ It covers
• Final Exam: 60%. ◦ 27th April, 9:00 9:00 – 11:00, venue venue TBC. TBC. 8 / 111
5
9 / 111
Linear Systems & Their Solutions Lines on the plane • Consider the xy -plane: y
(x0 , y0 )
y0
x0
O
x
◦ Every point on the xy -plane can be uniquely represented by a pair of real numbers (x0 , y0 ). 10 / 111
Lines on the plane • Consider the xy -plane: y
ax + by = c
x
O
◦ The points on a straight line are precisely all the points (x, y) on the xy -plane satisfying a linear equation •
ax + by = c ,
where a and b are not both zero. 11 / 111
6
Linear Equation • A linear equation in n variables ( unknowns) x1 , x2 , . . . , xn is an equation in the form ◦
a1 x1 + a2 x2 + · · · + an xn = b ,
where a1 , a2 , . . . , an and b are real constants.
• Note: In a linear equation, we do not assume that a1 , a2 , . . . , an are not all zero.
= 0, it is inconsistent. ◦ If a1 = · · · = a n = 0 but b ◦ If a1 = · · · = a n = b = 0, it is a zero equation. ◦ A linear equation which is not a zero equation is called a nonzero equation. For instance,
◦ 0x1 + 0x2 = 1 is inconsistent; ◦ 0x1 + 0x2 = 0 is a zero equation; ◦ 2x1 − 3x2 = 4 is a nonzero equation. 12 / 111
Examples • The following equations are linear equations: ◦ x + 3y = 7; ◦ x1 + 2x2 + 2x3 + x4 = x5 ; •
x1 + 2x2 + 2x3 + x4 − x5 = 0.
◦ y = x − 21 z + 4.5; •
−x + y + 21 z = 4.5.
• The following equations are NOT linear equations: ◦ xy = 2; ◦ sin θ + cos φ = 0.2; ◦ x21 + x22 + · · · + x2n = 1; ◦ x = e y . 13 / 111
7
Examples • In the xyz -space, the linear equation ◦
ax + by + cz = d ,
where a, b, c are not all zero, represents a plane. z
O
y
x
For instance, z = 0 (i.e., 0x + 0y + 1z = 0) is the xy -plane contained inside the xyz -space. 14 / 111
Solutions of a Linear System • Let a1 x1 + a2 x2 + · · · + an xn = b be a linear equation in n variables x1 , x2 , . . . , xn . ◦ For real numbers s1 , s2 , . . . , sn , if •
a1 s1 + a2 s2 + · · · + ansn = b,
then
x1 = s 1 , x2 = s 2 , . . . , xn = s n is a solution to the given linear equation.
◦ The set of all solutions is called the solution set. •
•
The solution set of ax + by = c (in x, y ), where a, b are not all zero, represents a straight line in xy -plane. The solution set of ax + by + cz = d (in x, y,z ), where a, b, c not all zero, represents a plane in xyz -space.
◦ An expression that gives the entire solution set is a general solution. 15 / 111
8
Examples • Linear equation 4x − 2y = 1 in variables x and y . ◦ x can take any arbitrary value, say t. •
•
x = t ⇒ y = 2t − 21 . x = t, General solution: t is a parameter. y = 2t − 21 ,
◦ y can take any arbitrary value, say s. •
•
y = s ⇒ x = 21 s + 41 . x = 21 s + 41 , General solution: s is a parameter. y = s,
• Different representations of the same solution set . ◦
x = 1, y = 1.5,
x = 1.5, y = 2.5,
x = −1, y = −2.5. 16 / 111
Examples • x1 − 4x2 + 7x3 = 5 in three variables x1 , x2 , x3 . ◦ x2 and x3 can be chosen arbitrarily, say s and t. •
•
x2 = s and x3 = t ⇒ x1 = 5 + 4s − 7t.
x1 = 5 + 4s − 7t, x2 = s, s, t are arbitrary parameters. x3 = t,
◦ x1 and x2 can be chosen arbitrarily, say s and t. •
•
x1 = s and x2 = t ⇒ x3 =
5 7
− 71 s + 74 t.
x1 = s, x2 = t, s, t are arbitrary parameters. x3 = 75 − 71 s + 74 t, 17 / 111
9
Examples • In xy -plane, x + y = 1 has a general solution ◦ (x, y) = (1 − s, s), s is an arbitrary parameter. These points form a line in xy -plane: y 1
(1 − s, s) x + y = 1
O
1
x
18 / 111
Examples • In xyz -space, x + y = 1 has a general solution ◦ (x,y,z ) = (1 − s,s,t), s, t are arbitrary parameters. These points form a plane in xyz -space: z
(1 − s, s,t)
O
y (1 − s,s, 0)
x
The projection of “the plane x + y = xy -plane”.
1 in xyz -space” on the xy -plane is “the line x + y = 1 in 19 / 111
10
Examples • The zero equation in n variables x1 , x2 , . . . , xn is ◦ 0x1 + 0x2 + · · · + 0xn = 0 (or simply 0 = 0). The equation is satisfied by any values of x1 , x2 , . . . , xn .
◦ The general solution is given by •
(x1 , x2 , . . . , xn ) = (t1, t2, . . . , tn ),
where t1 , t2 , . . . , tn are arbitrary parameters.
= 0. An inconstant equation in n variables x1 , x2 , . . . , xn • Let b ◦ 0x1 + 0x2 + · · · + 0xn = b (or simply 0 = b ). It is NOT satisfied by any values of x1 , x2 , . . . , xn .
◦ An inconstant equation has NO solution. 20 / 111
Linear System • A linear system (system of linear equations) of m linear equations in n variables x1 , x2 , . . . , xn is
◦
a11 x1 + a12 x2 + · · · + a1n xn = b 1 , a21 x1 + a22 x2 + · · · + a2n xn = b 2 , .. .
.. .
am1 x1 + am2 x2 + · · · + a mnxn = b m ,
where aij and bi are real constants.
◦ aij is the coefficient of x j in the ith equation, ◦ bi is the constant term of the ith equation. • If all aij and bi are zero, ◦ the linear system is called a zero system. If some aij or bi is nonzero,
◦ the linear system is called a nonzero system. 21 / 111
11
Linear System • A linear system (system of linear equations) of m linear equations in n variables x1 , x2 , . . . , xn is
◦
a11 x1 + a12 x2 + · · · + a1n xn = b 1 , a21 x1 + a22 x2 + · · · + a2n xn = b 2 , .. .
.. .
am1 x1 + am2 x2 + · · · + a mnxn = b m ,
where aij and bi are real constants.
• If x1 = s 1 , x2 = s 2 , . . . , xn = s n is a solution to every equation of the linear system, then it is called a solution to the system. ◦ The solution set is the set of all solutions to the linear system. ◦ A general solution is an expression which generates the solution set of the linear system. 22 / 111
Example • Linear system
4x1 − x2 + 3x3 = −1, 3x1 + x 2 + 9x3 = −4.
◦ x1 = 1, x2 = 2, x3 = −1 is a solution to both equations, then it is a solution to the system. ◦ x1 = 1, x2 = 8, x3 = 1 is a solution to the first equation, but not a solution to the second equation; so it is not a solution to the system. Problem: How to find a general solution to the system?
◦
x1 = 1 + 12t, x2 = 2 + 27t, where t is an arbitrary parameter. x3 = −1 − 7t, 23 / 111
12
Consistency • Remark. In a linear system, even if every equation has a solution, there may not be a solution to the system. ◦
• •
x + y = 4, 2x + 2y = 6. 2x + 2y = 6 ⇒ x + y = 3. x + y = 4 & x + y = 3 ⇒ 4 = 3, impossible!
• Definition. A linear system is called ◦ consistent if it has at least one solution; ◦ inconsistent if it has no solution. • Remark. A linear system has either ◦ no solution, or ◦ exactly one solution, or ◦ infinitely many solutions. (To be shown in Chapter 2) 24 / 111
Examples • Linear system in variables x, y of two equations: ◦
a1 x + b 1 y = c 1, (L1 ) a2 x + b 2 y = c 2. (L2 )
Assume a1 , b1 are not both zero, a2 , b2 are not both zero.
◦ In the xy -plane, each equation represent a straight line. y L1
L2 x
O
◦ The system has no solution
⇔ L1 and L2 are parallel but distinct. 25 / 111
13
Examples • Linear system in variables x, y of two equations: ◦
a1 x + b 1 y = c 1, (L1 ) a2 x + b 2 y = c 2. (L2 )
Assume a1 , b1 are not both zero, a2 , b2 are not both zero.
◦ In the xy -plane, each equation represent a straight line. y
L1
L2 x
O
◦ The system has exactly one solution
⇔ L1 and L2 are not parallel. 26 / 111
Examples • Linear system in variables x, y of two equations: ◦
a1 x + b 1 y = c 1, (L1 ) a2 x + b 2 y = c 2. (L2 )
Assume a1 , b1 are not both zero, a2 , b2 are not both zero.
◦ In the xy -plane, each equation represent a straight line. y
L1
L2
x
O
◦ The system has infinitely many solutions
⇔ L1 and L2 are the same line. 27 / 111
14
Examples • Linear system in variables x, y,z of two equations: ◦
a1 x + b 1 y + c 1z = d1 , (P 1) a2 x + b 2 y + c 2z = d2 . (P 2)
Assume a1 , b1 , c1 are not all zero, a2 , b2 , c2 are not all zero.
◦ Each equation represents a plane in xyz -space.
P 2
P 1
◦ The system has no solution
⇔ P 1 and P 2 are parallel but distinct. 28 / 111
Examples • Linear system in variables x, y,z of two equations: ◦
a1 x + b 1 y + c 1z = d1 , (P 1) a2 x + b 2 y + c 2z = d2 . (P 2)
Assume a1 , b1 , c1 are not all zero, a2 , b2 , c2 are not all zero.
◦ Each equation represents a plane in xyz -space.
P 1
P 2
◦ The system has infinitely many solutions if P 1 and P 2 are the same plane. 29 / 111
15
Examples • Linear system in variables x, y,z of two equations: ◦
a1 x + b 1 y + c 1z = d1 , (P 1) a2 x + b 2 y + c 2z = d2 . (P 2)
Assume a1 , b1 , c1 are not all zero, a2 , b2 , c2 are not all zero.
◦ Each equation represents a plane in xyz -space. P 2
P 1
◦ The system has infinitely many solutions if P 1 and P 2 intersect at a straight line. 30 / 111
Examples • Linear system in variables x, y,z of two equations: ◦
a1 x + b 1 y + c 1z = d1 , (P 1) a2 x + b 2 y + c 2z = d2 . (P 2)
Assume a1 , b1 , c1 are not all zero, a2 , b2 , c2 are not all zero.
◦ Each equation represents a plane in xyz -space. 1.
P 1 and P 2 represent the same plane ⇔ a1 : a 2 = b 1 : b 2 = c 1 : c 2 = d 1 : d 2 .
2.
P 1 and P 2 are parallel planes ⇔ a1 : a 2 = b 1 : b 2 = c 1 : c 2 .
3.
P 1 and P 2 intersect at a line ⇔ a1 : a 2 , b1 : b 2 , c1 : c 2 are not all the same. 31 / 111
16
32 / 111
Elementary Row Operations Augmented Matrix • A linear system in variables x1 , x2 , . . . , xn :
◦
a11 x1 + a12 x2 + · · · + a1n xn = b 1 , a21 x1 + a22 x2 + · · · + a2n xn = b 2 , .. .
.. .
am1 x1 + am2 x2 + · · · + a mnxn = b m ,
◦ The rectangular array of constants
•
a11 a21 .. .
a12 a22
··· ···
.. .
a1n a2n .. .
b1 b2 .. .
am1 am2 · · · amn bm
is called the augmented matrix of the linear system.
• A linear system in y 1 , y2 , . . . , yn with the same coefficients & constant terms has the same augmented matrix. 33 / 111
Example • Linear system
x1 + x2 + 2x3 = 9, 2x1 + 4x2 − 3x3 = 1, 3x1 + 6x2 − 5x3 = 0.
◦ Augmented matrix:
1 1 2 9 2 4 −3 1 3 6 −5 0
This is also the augmented matrix for:
•
•
y1 + y2 + 2y3 = 9, 2y1 + 4y2 − 3y3 = 1, 3y1 + 6y2 − 5y3 = 0. ♠ + ♥ + 2♣ = 9, 2♠ + 4♥ − 3♣ = 1, 3♠ + 6♥ − 5♣ = 0. 34 / 111
17
Elementary Row Operations • To solve a linear system, we perform operations: ◦ Multiply an equation by a nonzero constant. ◦ Interchange two equations. ◦ Add a constant multiple of an equation to another. • •
E 1 → E 1 + cE 2 = E 3 . E 3 → E 3 + (−c)E 2 = E 1 .
• In terms of augmented matrix, they correspond to operations on the rows of the augmented matrix: ◦ Multiply a row by a nonzero constant. ◦ Interchange two rows. ◦ Add a constant multiple of a row to another row. • •
R1 → R1 + cR2 = R 3 . R3 → R3 + (−c)R2 = R 1 . 35 / 111
Elementary Row Operations • The operations on rows of an augmented matrix: ◦ Multiply a row by a nonzero constant; ◦ Interchange two rows; ◦ Add a constant multiple of a row to another row; are called the elementary row operations.
• Remark. Interchanging two rows can be obtained by using the other two operations.
R1 R2
R1 + R2 −−−−−−−−−−−→ R2 add 2nd row to 1st row
R1 + R2 −−−−−−−−−−−−−−−−−→ −R1 add (−1) times 1st row to 2nd row
multiply 2nd row by ( −1)
−−−−−−−−−−−−→
R1 + R2 R1
add (−1) times 2nd row to 1st row
−−−−−−−−−−−−−−−−−→
R2 R1
36 / 111
18
Example • Compare operations of equations in a linear system and corresponding row operations of augmented matrix. ◦
• •
◦
• •
◦
x + y + 3z = 0 (1) 2x − 2y + 2z = 4 (2) 3x + 9y = 3 (3)
1 1 3 0 2 −2 2 4 3 9 0 3
1 1 3 0 0 −4 −4 4 3 9 0 3
Add (−2) times of (1) to (2) to obtain (4). Add (−2) times of first row to second row.
x + y + 3z = 0 (1) − 4y − 4z = 4 (4) 3x + 9y = 3 (3)
Add (−3) times of (1) to (3) to obtain (5). Add (−3) times of first row to third row.
x + y + 3z = 0 (1) − 4y − 4z = 4 (4) 6y − 9z = 3 (5)
1 1 3 0 0 −4 −4 4 0 6 −9 3
37 / 111
Example • Compare operations of equations in a linear system and corresponding row operations of augmented matrix. ◦
• •
◦
• •
x + y + 3z = 0 (1) − 4y − 4z = 4 (4) 6y − 9z = 3 (5)
1 1 3 0 0 −4 −4 4 0 6 −9 3
Add (6/4) times of (4) to (5) to obtain (6). Add (6/4) times of second row to third row.
x + y + 3z = 0 (1) − 4y − 4z = 4 (4) − 15z = 9 (6)
(6) ⇒ z = −3/5. Substitute z = −3/5 into (4): ◦
•
1 1 3 0 0 −4 −4 4 0 0 −15 9
−4y − 4(−3/5) = 4 ⇒ y = −2/5.
Substitute y = −2/5 and z = −3/5 into (1): ◦
x + (−2/5) + 3(−3/5) = 0 ⇒ x = 11/5. 38 / 111
19
Example • Compare operations of equations in a linear system and corresponding row operations of augmented matrix. ◦
• •
◦
x + y + 3z = 0 (1) − 4y − 4z = 4 (4) 6y − 9z = 3 (5)
1 1 3 0 0 −4 −4 4 0 6 −9 3
Add (6/4) times of (4) to (5) to obtain (6). Add (6/4) times of second row to third row.
x + y + 3z = 0 (1) − 4y − 4z = 4 (4) − 15z = 9 (6)
1 1 3 0 0 −4 −4 4 0 0 −15 9
The given linear system has exactly one solution:
◦ x = 11/5, y = −2/5, z = −3/5. Note that this is the solution of every linear system in the procedure of solving the given linear system. 39 / 111
Row Equivalent Matrices • Definition. Two augmented matrices are said to be row equivalent if one can be obtained from the other by a series of elementary row operations. ◦
A •
◦
A •
◦
A •
multiply a row by nonzero c
−−−−−−−−−−−−→ B
multiply the same row by 1/c
−−−−−−−−−−−−−→
interchange two rows
−−−−−−−−−→ B
interchange the two rows again
−−−−−−−−−−−−−−→
add c times of row i to row j
A.
B.
add (−c) times of row i to row j
−−−−−−−−−−−−−−−→
A is row equivalent to B
◦ ◦
A.
B.
−−−−−−−−−−−−−→ B
B.
A.
⇔ B is row equivalent to A.
= A1 → A2 → · · · → Ak 1 → Ak = B . B = Ak → Ak 1 → · · · → A2 → A1 = A. A
−
−
40 / 111
20
Row Equivalent Matrices • Theorem. Let A, B , C be augmented matrices. ◦ ◦
A is row equivalent to A. A is row equivalent to B
⇒ B is row equivalent to A. ◦
A is row equivalent to B & B is row equivalent to C
⇒ A is row equivalent to C . • Theorem. Let A and B be augmented matrices of two linear systems. Suppose A and B are row equivalent. ◦ Then the corresponding linear systems have the same set of solutions. • Question. Given an augmented matrix A, how to find an row equivalent augmented matrix B which is of a simple (or the simplest) form? 41 / 111
42 / 111
Row-Echelon Form Row-Echelon Form
• Definition. An augmented matrix is said to be in row-echelon form if the following properties are satisfied. 1.
The zero rows are grouped together at the bottom. nonzero row
······ nonzero row zero row
······ zero row 2.
For any two successive nonzero rows, the first nonzero number (leading entry) in the lower row appears to the right of the first nonzero number in the higher row.
0 ··· 0 ⊗ ∗ ··· ∗ ∗ ∗ · ·· , ⊗ nonzero. 0 ··· 0 0 0 ··· 0 ⊗ ∗ ··· 43 / 111
21
Row-Echelon Form • Definition. Suppose an augmented matrix is in row-echelon form. ◦ The leading entry of a nonzero row is a pivot point. ◦ A column of the augmented matrix is called a pivot column if it contains a pivot point; non-pivot column if it contains no pivot point.
• •
0 0 0 0
··· ··· ··· ···
0 0 0 0
∗ ··· 0 ··· 0 ··· 0 ···
∗ ∗ ··· 0 ∗ ··· 0 0 ··· 0 0 ···
.. .
. . . . · · · .. .. · · · .. .. · · · 0 ··· 0 0 ··· 0 0 ···
↑
↑
∗ ∗ ··· ∗ ∗ ··· 0 ∗ · ·· 0 0 ··· .. .
.. .
··· 0 0 ··· ↑
◦ A pivot column contains exactly one pivot point. 44 / 111
Examples • These augmented matrices are in row-echelon form: ◦ ◦
◦
◦
◦
3 2 1
1 −1 0 0 1 0 2 1 0 0 1 0 0 0 1
−1 2 3 4
0 0 0 0 0 0
1 1 2 0 2 3 1 0 0 0
2 0 0 0
8 4 0 0
1 3 0 0
45 / 111
22
Examples • These are in reduced row-echelon form: ◦ ◦
◦
◦
◦
1 2 3 0 0 0 0 0 0
1 0 0 0 1 0 0 0 1
1 0 0 1 0 1 0 2 0 0 1 3 0 0 0 0
1 0 0 0
2 0 0 0
0 1 0 0
1 3 0 0
48 / 111
Examples • These row-echelon forms are NOT reduced: ◦ ◦
◦
◦
◦
3 2 1
1 −1 0 0 1 0 2 1 0 0 1 0 0 0 1
−1 2 3 4
0 0 0 0 0 0
1 1 2 0 2 3 1 0 0 0
2 0 0 0
8 4 0 0
1 3 0 0
49 / 111
24
Solve Linear System • Suppose that the augmented matrix of a linear system is in (reduced) row-echelon form. ◦ Is it convenient to find a solution to the linear system? • Example. ◦ Augmented matrix
◦ Linear system
•
1 0 0 1 0 1 0 2 0 0 1 3
.
1x1 + 0x2 + 0x3 = 1 0x1 + 1x2 + 0x3 = 2 0x1 + 0x2 + 1x3 = 3. x1
Equivalently
=1 x2 =2 x3 = 3.
◦ The system has one solution x1 = 1, x2 = 2, x3 = 3. 50 / 111
Solve Linear System • Suppose that the augmented matrix of a linear system is in (reduced) row-echelon form. ◦ Is it convenient to find a solution to the linear system? • Example. ◦ Augmented matrix ◦ Linear system
0 0 0 0 0 0 0 0
.
0x1 + 0x2 + 0x3 = 0 0x1 + 0x2 + 0x3 = 0.
◦ This is a zero system in three variables. It has infinitely many solutions •
x1 = r , x2 = s , x3 = t , r, s, t arbitrary parameters. 51 / 111
25
Solve Linear System • Suppose that the augmented matrix of a linear system is in (reduced) row-echelon form. ◦ Is it convenient to find a solution to the linear system? • Example. ◦ Augmented matrix
◦ Linear system
3 1 4 0 2 1 0 0 1
.
3x1 + 1x2 = 4 0x1 + 2x2 = 1 0x1 + 0x2 = 1
◦ The last equation is inconsistent; so the system is inconsistent. 52 / 111
Examples • Augmented matrix
◦
1 −1 0 3 −2 0 0 1 2 5 0 0 0 0 0
1x1 − 1x2 + 0x3 + 3x4 = −2 0x1 + 0x2 + 1x3 + 2x4 = 5 0x1 + 0x2 + 0x3 + 0x4 = 0
.
53 / 111
26
Examples • Augmented matrix
◦ 1.
x1 − x2
1 −1 0 3 −2 0 0 1 2 5 0 0 0 0 0
+ 3x4 = −2 x3 + 2x4 = 5
.
Let x4 = t and substitute into the second equation.
x3 + 2t = 5 ⇒ x3 = 5 − 2t. 2. Substitute x4 = t into the first equation. ◦
◦ ◦
x1 − x2 + 3t = −2. Let x2 = s . Then x1 = −2 + s − 3t.
Infinitely many solutions (s and t are arbitrary parameters)
◦ x1 = −2 + s − 3t, x2 = s , x3 = 5 − 2t, x4 = t . 54 / 111
Examples • Augmented matrix
◦
0 2 2 1 −2 2 0 0 1 1 1 3 0 0 0 0 2 4
.
0x1 + 2x2 + 2x3 + 1x4 − 2x5 = 2 0x1 + 0x2 + 1x3 + 1x4 + 1x5 = 3 0x1 + 0x2 + 0x3 + 0x4 + 2x5 = 4.
55 / 111
27
Examples • Augmented matrix
◦
0 2 2 1 −2 2 0 0 1 1 1 3 0 0 0 0 2 4
2x2 + 2x3 + x 4 − 2x5 = 2 x3 + x 4 + x5 = 3 2x5 = 4.
1. By the third equation, 2x5 2. Substitute x5
◦ ◦
.
= 4 ⇒ x5 = 2.
= 2 into the second equation:
x3 + x4 + 2 = 3, i.e., x3 + x4 = 1. Let x4 = t . Then x3 = 1 − t.
3. Substitute x5
◦
= 2, x3 = 1 − t, x4 = t into the first:
2x2 + 2(1 − t) + t − 2 · 2 = 2. So x2 = 2 + 21 t. 56 / 111
Examples • Augmented matrix
◦
0 2 2 1 −2 2 0 0 1 1 1 3 0 0 0 0 2 4
2x2 + 2x3 + x 4 − 2x5 = 2 x3 + x 4 + x5 = 3 2x5 = 4.
.
The system has infinitely many solutions
◦
x1 x2 x3 x4 x5
= s = 2 + 21 t =1−t = t = 2,
where s and t are arbitrary parameters. 57 / 111
28
Algorithm • Suppose that the augmented matrix corresponding to a linear system is in row-echelon form. Set the variables corresponding to non-pivot columns to be arbitrary parameters.
1.
2. Solve the variables corresponding to pivot columns by back substitution (from last equation to first.)
0x1 + 2x2 + 2x3 + x 4 − 2x5 = 2 x3 + x 4 + x5 = 3 Example. 2x5 = 4. ◦ Variables corresponding to pivot columns: x2 , x3 , x5 . ◦ Variables corresponding to non-pivot columns: x 1 , x4 . • •
Set x1 = s and x2 = t as arbitrary parameters. Solve x5 = 2, x3 = 1 − t and x2 = 2 + 21 t. 58 / 111
59 / 111
Gaussian Elimination Row Echelon Form • Definition. Let A and R be augmented matrices. ◦ Suppose that A is row equivalent to R . •
i.e., R can be obtained from A by a series of elementary row operations. A
1.
A1
→ A2 → · · · → Ak =
R .
If R is in row-echelon form,
◦ 2.
= A0 →
R is called a row-echelon form of A.
If R is in reduced row-echelon form,
◦
R is called a reduced row-echelon form of A.
• Solve a linear system with augmented matrix A
⇔ solve a linear system with augmented matrix R . 60 / 111
29
Gaussian Elimination • Given an augmented matrix, we need an algorithm to find its (reduced) row-echelon form of A. • Example.
0 0 0 2 4 2 8 0 1 2 4 5 3 −9 0 −2 −4 −5 −4 3 6
1. Find the leftmost column which is not entirely zero. 2. Check the top entry of such column. If it is 0 ,
0 0 0 2 4 2 8 0 1 2 4 5 3 −9 0 −2 −4 −5 −4 3 6
◦
replace it by a nonzero number by interchanging the top row with another row below.
0 1 2 4 5 3 −9 0 0 0 2 4 2 8 0 −2 −4 −5 −4 3 6
61 / 111
Gaussian Elimination • Example.
0 1 2 4 5 3 −9 0 0 0 2 4 2 8 0 −2 −4 −5 −4 3 6
1. Find the leftmost column which is not entirely zero. 2.
If the top entry of such column is 0,
◦ 3.
then replace it by a nonzero number by interchanging the top row with another row below.
For each row below the top row,
◦
add a suitable multiple of the top row to it so that its leading entry becomes 0.
Add 2 times the first row to the third row:
◦
0 1 2 4 5 3 −9 0 0 0 2 4 2 8 0 0 0 3 6 9 −12
62 / 111
30
Gaussian Elimination • Example. 4.
0 1 2 4 5 3 −9 0 0 0 2 4 2 8 0 0 0 3 6 9 −12
Cover the top row and repeat the procedure to the matrix remained.
1. The 4th column is the leftmost nonzero column.
◦
0 1 2 4 5 3 −9 0 0 0 2 4 2 8 0 0 0 3 6 9 −12
2. The top entry is nonzero. No action. 3.
Add −3/2 times the 2nd row to the 3rd row.
◦
0 1 2 4 5 3 −9 0 0 0 2 4 2 8 0 0 0 0 0 6 −24
4. This is in row-echelon form. Done! 63 / 111
Gaussian Elimination • Gaussian Elimination. Use elementary row operations to reduce an augmented matrix to row-echelon form. 1.
Find the leftmost column which is not entirely zero.
2. If the top entry of such column is 0,
◦
then replace it by a nonzero number by interchanging the top row with another row.
3. For each row below the top row,
◦ 4.
add a suitable multiple of the top row to it so that its leading entry becomes 0.
Cover the top row and repeat the procedure to the remained matrix.
◦
Continue this way until the entire matrix is in row-echelon form. 64 / 111
31
Example •
2x3 + 4x4 + 2x5 = 8 x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9 −2x1 − 4x2 − 5x3 − 4x4 + 3x5 = 6
◦ Augmented matrix:
0 0 2 4 2 8 1 2 4 5 3 −9 −2 −4 −5 −4 3 6
We have found a row-echelon form
◦
1 2 4 5 3 −9 0 0 2 4 2 8 0 0 0 0 6 −24
It corresponds to the linear system
◦
x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9 2x3 + 4x4 + 2x5 = 8 6x5 = −24 65 / 111
Example • The given linear system has the same solution set as ◦ 1.
Set the variables corresponding to non-pivot columns as arbitrary parameters.
◦ 2.
x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9 2x3 + 4x4 + 2x5 = 8 6x5 = −24 x2 = s and x4 = t .
Solve the variables corresponding to pivot columns.
6x5 = −24 ⇒ x5 = −4. ◦ 2x3 + 4 · t + 2( −4) = 8 ⇒ x3 = 8 − 2t. ◦ x1 + 2 · s + 4(8 − 2t) + 5 · t + 3( −4) = −9 ◦
⇒ x1 = −29 − 2s + 3t. 66 / 111
32
Example •
2x3 + 4x4 + 2x5 = 8 x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9 −2x1 − 4x2 − 5x3 − 4x4 + 3x5 = 6
This system has general solution
◦
x1 x2 x3 x4 x5
= −29 − 2s + 2t = s = 8 − 2t = t = −4
where s and t are arbitrary parameters. 67 / 111
Gauss-Jordan Elimination • Suppose an augmented matrix is in row-echelon form. Is there an algorithm to get its reduced row-echelon form? • Example.
1 2 4 5 3 −9 0 0 2 4 2 8 0 0 0 0 6 −24
1. All the pivot points must be 1 .
.
◦ Multiply 1/2 to 2nd row, multiply 1/6 to 3rd row. ◦
1 2 4 5 3 −9 0 0 1 2 1 4 0 0 0 0 1 −4
.
68 / 111
33
Gauss-Jordan Elimination • Example.
1 2 4 5 3 −9 0 0 1 2 1 4 0 0 0 0 1 −4
.
In each pivot column, all entries other than the pivot point must be 0 .
2.
◦
Add (−3) times 3rd row to 1st row, and add ( −1) times 3rd row to 2nd row.
1 2 4 5 0 3 0 0 1 2 0 8 . 0 0 0 0 1 −4 ◦ Add (−4) times 2nd row to 1st row. 1 2 0 −3 0 −29 0 0 1 2 0 8 . 0 0 0 0 1 −4
69 / 111
Gauss-Jordan Elimination • Gauss-Jordan Elimination. Use elementary row operations to reduce a matrix to reduced row-echelon form. 1-4.
Use Gaussian Elimination to get a row-echelon form.
5.
For each nonzero row, multiple a suitable constant so that the pivot point becomes 1.
6.
Begin with the last nonzero row, work backwards.
◦
Add suitable multiple of each row to the rows above to introduce 0 above the pivot points.
• Remarks. ◦ Every matrix has a unique reduced row-echelon form. •
(Can you prove it? It is very challenging!)
◦ Every nonzero matrix has infinitely many (non-reduced) row-echelon forms. 70 / 111
34
Example •
2x3 + 4x4 + 2x5 = 8 x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9 −2x1 − 4x2 − 5x3 − 4x4 + 3x5 = 6
◦ Augmented matrix:
0 0 2 4 2 8 1 2 4 5 3 −9 −2 −4 −5 −4 3 6
We have found a reduced row-echelon form
◦
1 2 0 −3 0 −29 0 0 1 2 0 8 0 0 0 0 1 −4
It corresponds to the linear system
◦
x1 + 2x2
− 3x4 +
x3 + 2x4
= −29 = 8 x5 = −4 71 / 111
Example •
2x3 + 4x4 + 2x5 = 8 x1 + 2x2 + 4x3 + 5x4 + 3x5 = −9 −2x1 − 4x2 − 5x3 − 4x4 + 3x5 = 6
It has the same solution set as the linear system
◦ 1.
x1 + 2x2
− 3x4 +
x3 + 2x4
= −29 = 8 x5 = −4
Set the variables corresponding to non-pivot columns as arbitrary parameters: x 2 = s and x4 = t .
2. Solve other variables:
◦ ◦ ◦
x1 + 2s − 3t = −29 ⇒ x1 = −29 − 2s + 3t. x3 + 2t = 8 ⇒ x3 = 8 − 2t. x5 = −4. 72 / 111
35
Consistency • Suppose that A is the augmented matrix of a linear system, and R is a row-echelon form of A. ◦ When the system has no solution (i.e., is inconsistent)? ◦ When the system has exactly one solution? ◦ When the system has infinitely many solutions? • Recall the procedure of finding solution: 1.
Set the variables corresponding to non-pivot columns as arbitrary parameters.
2.
Solve variables corresponding to pivot columns.
The procedure is valid as long as
◦ Every row of R corresponds to a consistent equation. ◦ i.e., no row corresponds to an inconsistent equation:
0x1 + 0x2 + · · · + 0xn = ⊗ ← nonzero.
•
73 / 111
Consistency • Suppose that A is the augmented matrix of a linear system, and R is a row-echelon form of A. ◦ When the system has no solution (i.e., is inconsistent)? Answer: There is a row in R with the form
◦
0 0 · · · 0 ⊗ , where ⊗ is nonzero.
Or equivalently, the last column is a pivot column.
Note: Such a row must be the last nonzero row of R .
• Examples. ◦
3 2 3 4 0 0 1 1 0 0 0 2
,
3 2 3 4 0 0 0 5 0 0 0 0
.
74 / 111
36
Consistency • Suppose that A is the augmented matrix of a linear system, and R is a row-echelon form of A. ◦ When the system has exactly one solution? • Recall the procedure of finding solution: 1.
Set the variables corresponding to non-pivot columns as arbitrary parameters.
2.
Solve variables corresponding to pivot columns.
For consistency, the last column is non-pivot. We also need
◦ No variables corresponding to non-pivot columns. Answer:
◦ The last column is a non-pivot column, and ◦ All other columns are pivot columns. 75 / 111
Consistency • Suppose that A is the augmented matrix of a linear system, and R is a row-echelon form of A. ◦ When the system has exactly one solution? Answer:
◦ The last column is a non-pivot column, and ◦ All other columns are pivot columns. Example : (Here ⊗ are pivot points, which are nonzero.)
◦
⊗ ∗ 0 ⊗
0
∗ ··· ∗ ∗ ··· ∗ 0 ⊗ ··· ∗
.. .
.. .
0 0 0
0 0 0
.. .
..
∗ ∗ ∗
∗ ∗ 0 · ·· ⊗ ∗ 0 ··· 0 0 0 ··· 0 0 .
76 / 111
37
Consistency • Suppose that A is the augmented matrix of a linear system, and R is a row-echelon form of A. ◦ When the system has infinitely many solutions? Answer:
◦ The last column is a non-pivot column, and ◦ Some other columns are non-pivot columns. Note: The number of arbitrary parameters is the same as the number of non-pivot columns (except the last column).
• Examples: ◦
5 1 2 3 4 0 0 −1 0 1 0 0 0 1 2
,
0 1 2 3 4 0 0 −1 0 1 0 0 0 0 0
.
77 / 111
Notations • Notations for elementary row operations. ◦ Multiply the ith row by (nonzero) constant k : kRi . ◦ Interchange the ith and the j th rows: Ri ↔ R j . ◦ Add k times the ith row to the j th row: R j + kR i . Note:
◦ R1 + R2 means “add the 2nd row to the 1st row”. ◦ R2 + R1 means “add the 1st row to the 2nd row”. • Example. ◦
a b
R1 +R2
−−−−→
R1 +R2
−−−−→
a + b R +( 1)R −−−−−−→ b ( 1)R b b . −−−−→ a −a 2
−
−
1
a + b −a
2
78 / 111
38
Example 1 • What is the condition so that the system is consistent? ◦
x + 2y − 3z = a 2x + 6y − 11z = b x − 2y + 7z = c.
• The augmented matrix is
1 2 −3 2 6 −11 1 −2 7
1 2 −3 a 2 6 −11 b 1 −2 7 c
.
a 1 2 −3 R +( 2)R b 0 2 −5 −−−−−−−→ c 1 −2 7 1 2 −3 a R +( 1)R 0 2 −5 b − 2a −−−−−−−→ 0 −4 10 c − a 1 2 −3 a R +2R 0 2 −5 b − 2a −−−−−→ 0 0 0 2b + c − 5a 3
−
3
1
2
2
−
1
a b − 2a c
79 / 111
Example 1 • What is the condition so that the system is consistent? ◦
x + 2y − 3z = a 2x + 6y − 11z = b x − 2y + 7z = c.
• A row-echelon form of the augmented matrix is ◦
1 2 −3 a 0 2 −5 b − 2a 0 0 0 2b + c − 5a
◦ The system is consistent
⇔ the last column is non-pivot ⇔ 2b + c − 5a = 0. ◦ Moreover, suppose the system is consistent. • •
The 3rd column is non-pivot Infinitely many solutions (one arbitrary parameter). 80 / 111
39
Example 2 • Find the number of solutions:
x + 2y + z = 1 2x + by + 2z = 2 4x + 8y + b 2 z = 2b
• Find a row-echelon form of augmented matrix. ◦
1 2 1 1 2 b 2 2 4 8 b2 2b
R3 +(−4)R1
−−−−−−→
R2 +(−2)R1
−−−−−−→
1 2 1 1 2 b 2 2 2 0 0 b − 4 2b − 4
1 2 1 1 0 b−4 0 0 2 0 0 b − 4 2b − 4
81 / 111
Example 2 • Find the number of solutions:
x + 2y + z = 1 2x + by + 2z = 2 4x + 8y + b 2 z = 2b
• Find a row-echelon form of augmented matrix. ◦
•
1 2 1 2 b 2 4 8 b2
1 2 2b
···→
1 2 0 b−4 0 0
1 0
1 0
b2 − 4
2b − 4
If b = 4, then we can continue
1 2 1 0 b−4 0 2 0 0 b −4
1 0 2b − 4
=
1 0 0
R2 ↔R3
−−−−−→ •
2 1 0 0 0 12
1 2 0 0 0 0
1 0 4
1 12 0
1 4 0
The second column and the last column are non-pivot. Infinitely many solutions (one parameter). 82 / 111
40
Example 2 • Find the number of solutions:
= 4. Row-echelon form: • Let b
x + 2y + z = 1 2x + by + 2z = 2 4x + 8y + b 2 z = 2b 1 2 1 1 0 b−4 0 0 2 0 0 b − 4 2b − 4
◦ No solution ⇔ The last column is a pivot column. The last column is pivot ⇔
⇔ ⇔
2b − 4 is the pivot point
b2 − 4 = 0 2b − 4 =0 b = 2 or − 2 b =2
⇔ b = −2. 83 / 111
Example 2 • Find the number of solutions:
= 4. Row-echelon form: • Let b
x + 2y + z = 1 2x + by + 2z = 2 4x + 8y + b 2 z = 2b 1 2 1 1 0 b−4 0 0 2 0 0 b − 4 2b − 4
◦ Unique solution ⇔ Only the last column is non-pivot.
Only the last column is non-pivot
⇔ the first three columns are pivot ⇔
1 =0 b−4 =0 2 b −4 =0
= 4, b = −2, b = 2. ⇔b 84 / 111
41
Example 2 • Find the number of solutions:
= 4. Row-echelon form: • Let b ◦ Infinitely many solutions
x + 2y + z = 1 2x + by + 2z = 2 4x + 8y + b 2 z = 2b 1 2 1 1 0 b−4 0 0 2 0 0 b − 4 2b − 4
⇔ The last and some other columns are non-pivot. last column is non-pivot ⇔ some other colns non-pivot ⇔
b = −2
1 = 0 or b − 4 = 0 or b2 − 4 = 0
⇔ b = 4 or b = −2 or b = 2. 85 / 111
Example 2 • Find the number of solutions:
= 4. Row-echelon form: • Let b ◦ Infinitely many solutions: •
x + 2y + z = 1 2x + by + 2z = 2 4x + 8y + b 2 z = 2b 1 2 1 1 0 b−4 0 0 2 0 0 b − 4 2b − 4
b = 4 or b = 2.
◦ No solution: •
b = −2.
◦ Exactly one solution: •
b = 4, b = −2, b = 2. 86 / 111
42
Example 3 • Find the number of solutions:
a 1 0 a 1 1 1 1 0 1 a b
= a ax + y x + y + z = 1 y + az = b
R1 ↔R2
−−−−−→
R2 +(−a)R1
−−−−−−−→
R2 ↔R3
−−−−−→
1 1 1 1 a 1 0 a 0 1 a b
1 1 1 1 0 1 − a −a 0 0 1 a b
1 1 1 1 0 1 a b 0 1 − a −a 0
R3 +(a−1)R2
−−−−−−−−→
1 1 1 1 0 1 a b 2 0 0 a − 2a (a − 1)b
87 / 111
Example 3
ax + y = a x + y + z = 1 • Find the number of solutions: y + az = b 1 1 1 1 0 1 a b • Row-echelon form: 2 0 0 a − 2a (a − 1)b
No solution ⇔ last column is pivot
=0 ⇔ a2 − 2a = 0 and (a − 1)b = 1 and b = 0) ⇔ (a = 0 or a = 2) and (a = 0. ⇔ (a = 0 or a = 2) and b 88 / 111
43
Example 3
= a ax + y x + y + z = 1 • Find the number of solutions: y + az = b 1 1 1 1 0 1 a b • Row-echelon form: 2 0 0 a − 2a (a − 1)b
Unique solution ⇔ Only the last column is non-pivot
=0 ⇔ a2 − 2a = 0 and a = 2. ⇔a Infinite solutions ⇔ last and some other columns non-pivot
⇔ a2 − 2a = 0 and (a − 1)b = 0 ⇔ (a = 0 or a = 2) and (a = 1 or b = 0) ⇔ (a = 0 or a = 2) and b = 0. 89 / 111
Example 4 • Find a cubic curve y = a + bx + cx2 + dx3 that contains points (0, 10), (1, 7), (3, −11), (4, −14). ◦ Substitute the (x, y)-coordinates into the cubic curve. •
We obtain four equations in variables a, b, c, d:
10 = a + 0b + 0c + 0d 7 = a + 1b + 1c + 1d −11 = a + 3b + 9c + 27d −14 = a + 4b + 16c + 64d
In the following, solve the linear system in a, b, c, d to complete the question.
•
Augmented matrix:
1 1 1 1
0 0 0 10 1 1 1 7 3 9 27 −11 4 1 6 6 4 −14
44
90 / 111
Example 4
1 0 0 0 1 1 1 1 1 3 9 27 1 4 16 64
10 7 −11 −14
R2 +(−1)R1 R3 +(−1)R1
−−−−−−−→ R4 +(−1)R1
R3 +(−1)R2
−−−−−−−→ R4 +(−4)R2
R4 +(−2)R3
−−−−−−−→
1 6 R3
− −−− → 1 12 R4
1 0 0 0 0 1 1 1 0 3 9 27 0 4 16 64
10 −3 −21 −24
1 0 0 0 0 1 1 1 0 0 6 24 0 0 12 60
−3 −12 −12
1 0 0 0
0 1 0 0
0 0 1 1 6 24 0 12
1 0 0 0 0 1 1 1 0 0 1 4 0 0 0 1
10 −3 −2 1
10
10 −3 −12 12
91 / 111
Example 4
1 0 0 0 1 1 1 1 1 3 9 27 1 4 16 64
10 7 −11 −14
−···→
R2 +(−1)R4
−−−−−−−→ R3 +(−4)R4
R2 +(−1)R3
−−−−−−−→
• Therefore, a = 10, b = 2, c = −6 and d = 1.
10 −3 −2 1
1 0 0 0
0 0 0 1 1 1 0 1 4 0 0 1
1 0 0 0
0 0 0 1 1 0 0 1 0 0 0 1
10 −4 −6 1
1 0 0 0
0 0 0 1 0 0 0 1 0 0 0 1
10 2 −6 1
◦ The cubic curve is y = 10 + 2x − 6x2 + x3 . 92 / 111
45
Geometric Interpretation • Linear system of three equations in three variables x, y,z : ◦
a11 x + a 12 y + a 13 z = b 1 a21 x + a 22 y + a 23 z = b 2 a31 x + a 32 y + a 33 z = b 3
Suppose that ai1 , ai2 , ai3 are not all zero, i =
1, 2, 3.
◦ Each equation represents a plane in the xyz -space. What is the reduced row-echelon form of the augmented matrix? What is the geometric interpretation?
◦ The reduced row-echelon form R has three rows and four columns. The system may be consistent. The system may be inconsistent.
• •
93 / 111
Geometric Interpretation • Assume that the system is consistent, i.e., the last column is of R is a non-pivot column. ◦ Each nonzero row contains exactly one pivot point. ◦ Each pivot column contains exactly one pivot point. no. of nonzero rows = no. of pivot points
= no. of pivot columns. 1. Suppose that R has three nonzero rows.
◦ ◦
The first three columns are all pivot columns.
1 0 0 ∗ 0 1 0 ∗ 0 0 1 ∗
The system has a unique solution. The three planes meet at a common point. 94 / 111
46
Geometric Interpretation • Assume that the system is consistent, i.e., the last column is of R is a non-pivot column. ◦ Each nonzero row contains exactly one pivot point. ◦ Each pivot column contains exactly one pivot point. no. of nonzero rows = no. of pivot points
= no. of pivot columns. 2. Suppose that R has two nonzero rows.
◦ ◦
One of the firstthree columns is non-pivot.
0 0 0
1 0 0
0 1 0
∗ ∗
0
1 0 0
∗
0 0
0 1 0
∗ ∗
0
1 0 0
0 1 0
∗
∗
∗
∗
0
0
The system has a infinitely many solutions with one arbitrary parameter. The three planes meet at a straight line. 95 / 111
Geometric Interpretation • Assume that the system is consistent, i.e., the last column is of R is a non-pivot column. ◦ Each nonzero row contains exactly one pivot point. ◦ Each pivot column contains exactly one pivot point. no. of nonzero rows = no. of pivot points
= no. of pivot columns. 3. Suppose that R has one nonzero row.
◦ ◦
Only one of the first three columns is pivot.
1 0 0
∗
∗
∗
0 0
0 0
0 0
0 0 0
1 0 0
∗
∗
0 0
0 0
0 0 0
0 0 0
1 0 0
∗
0 0
The system has a infinitely many solutions with two arbitrary parameters. The three planes coincides. 96 / 111
47
Examples •
x + y + 2z = 1 x − y − z = 0 . x + y − z = 2
1 1 2 1 −1 −1 1 1 −1
1 0 2
R2 +(−1)R1
−−−−−−−→ R3 +(−1)R1
(
1 − 2
)R2
(
1 − 3
)R3
−−−−−→
R1 +(−2)R3
−−−−−−−−→ 3
R2 +(− 2 )R3
R1 +(−1)R2
−−−−−−−→
Solution: x =
1 1 2 0 −2 −3 0 0 −3
1 1 0 1 0 0
2
1
3 2
1 2 − 13
1 0 1 0 0 1
1 0 0
1
1 0 0 0 1 0 0 0 1
1 −1 1
5 3
1 − 13 2 3
1 − 31
2/3, y = 1, z = −1/3. The three planes meet at point (2/3, 1, −1/3). 97 / 111
Examples
•
x + y + 2z = 1 x − y − z = 0 . 2x + z = 1 3x − y =1
1 1 2 1 −1 −1 2 0 1 3 −1 0
1 0 1 1
R2 +(−1)R1 R3 +(−2)R1
−−−−−−−→ R4 +(−3)R1
R3 +(−1)R2
−−−−−−−→ R4 +(−2)R2
(− 12 )R2
−−−−−→
48
1 0 0 0
1 1 2 0 −2 −3 0 −2 −3 0 −4 −6
1 −1 −1 −2
1 1 2 0 −2 −3 0 0 0 0 0 0
1 −1 0 0
1 1 0 0
2
1
3 2
1 2
0 0
0 0
98 / 111
Examples •
x + y + 2z = 1 3x + 3y + 6z = 3
1 1 2 1 3 3 6 3
R2 +(−3)R1
−−−−−−→
1 1 2 1 0 0 0 0
◦ Let y = s and z = t be arbitrary parameters. •
x + s + 2t = 1 ⇒ x = 1 − s − 2t.
◦ The two planes are the same, parameterized by •
(1 − s − 2t,s,t), s, t arbitrary parameters. 101 / 111
102 / 111
Homogeneous Linear Systems Homogeneous Linear Equations & Systems
• Definition. A linear equation in variables x 1 , x2 , . . . , x n is called homogeneous if it is of the form ◦
a1 x1 + a2 x2 + · · · + an xn = 0
• A linear equation in x1 , x2 , . . . , xn is homogeneous ⇔ x1 = 0, x2 = 0, . . . , xn = 0 is a solution. • Definition. A linear system is homogeneous if every linear equation of the system is homogeneous.
◦
a11 x1 + a12x2 + · · · + a1n xn = 0 a21 x1 + a22x2 + · · · + a2n xn = 0 .. .
.. .
am1 x1 + a m2 x2 + · · · + a mn xn = 0
• A linear system in x1 , x2 , . . . , xn is homogeneous ⇔ x1 = 0, x2 = 0, . . . , xn = 0 is a solution. This is the trivial solution of a homogeneous linear system. Other solutions are called non-trivial solutions.
103 / 111
50
Example • Find the equation ax2 + by 2 + cz 2 = d in the xyz -space which contains points (1, 1, −1), (1, 3, 3), (−2, 0, 2). • Substitute (x,y,z ) = (1, 1, −1), (1, 3, 3), (−2, 0, 2) to get three equations in a, b, c, d. ◦
a + b + c = d a + 9b + 9c = d 4a + 4c = d
This is a homogeneous system in a, b, c, d:
a + b + c − d = a + 9b + 9c − d = ◦ 4a + 4c − d = 1 1 ◦ Augmented matrix: 4
0 0 0 1 1 −1 0 9 9 −1 0 0 4 −1 0
104 / 111
Example • Find the equation ax2 + by 2 + cz 2 = d in the xyz -space which passes through (1, 1, −1), (1, 3, 3), (−2, 0, 2). •
a + b + c − d = 0 a + 9b + 9c − d = 0 4a + 4c − d = 0
1 1 4
1 1 −1 9 9 −1 0 4 −1
0 0 0
R2 +(−1)R1
−−−−−−−→ R3 +(−4)R1
1
R3 + 2 R2
−−−−−−→
1 8
R2
1 4
R3
−−−→
51
1 1 1 −1 0 8 8 0 0 −4 0 3
1 1 1 0 8 8 0 0 4
1 1 1 −1 0 1 1 0 0 0 1 34
−1
0 3 0 0 0
0 0 0
0 0 0
105 / 111
Example • Find the equation ax2 + by 2 + cz 2 = d in the xyz -space which passes through (1, 1, −1), (1, 3, 3), (−2, 0, 2). •
a + b + c − d = 0 a + 9b + 9c − d = 0 4a + 4c − d = 0
1 1 1 −1 1 9 9 −1 4 0 4 −1
0 0 0
−···→
R2 +(−1)R3
−−−−−−−→ R1 +(−1)R3
R1 +(−1)R2
−−−−−−−→
1 1 1 0 1 1 0 0 1
−1
0 3 4
0 0 0
1 0 0
1 1 0
0 − 74 0 − 34 1 33
1 0 0
0 1 0
0 −1 0 − 34 1 34
0 0 0
0 0 0
106 / 111
Example • Find the equation ax2 + by 2 + cz 2 = d in the xyz -space which passes through (1, 1, −1), (1, 3, 3), (−2, 0, 2). •
a + b + c − d = 0 a + 9b + 9c − d = 0 4a + 4c − d = 0
1 1 1 9 4 0
1 −1 9 −1 4 −1
0 0 0
−···→
1 0 0
0 0 −1 1 0 − 43 0 1 34
0 0 0
◦ Set d = t as an arbitrary parameter. Then •
a = t , b = 43 t and c = − 34 t.
For t = 0, the equation is tx2
+ 43 ty 2 − 43 tz 2 = t .
◦ It is equivalent to x2 + 43 y 2 + 43 z 2 = 1. 107 / 111
52
Geometric Interpretation • In the xy -plane, the homogeneous system of two equations ◦
a1 x + b 1 y = 0 (L1 ) a2 x + b 2 y = 0 (L2 )
where a1 , b1 not all zero, a2 , b2 not all zero, represent straight lines through the origin O(0, 0). y
L1 L2
x
O
◦ The system has only the trivial solution
⇔ L1 and L2 are different. 108 / 111
Geometric Interpretation • In the xy -plane, the homogeneous system of two equations ◦
a1 x + b 1 y = 0 (L1 ) a2 x + b 2 y = 0 (L2 )
where a1 , b1 not all zero, a2 , b2 not all zero, represent straight lines through the origin O(0, 0). y
L1 L2
O
x
◦ The system has non-trivial solutions
⇔ L1 and L2 are the same. 109 / 111
53