View
215
Download
2
Category
Tags:
Preview:
Citation preview
ENGG2013Unit 2 Linear Equations
Jan, 2011.
Linear Equation in n variables
• a1x1 + a2x2+ … + an xn = c– a1, a2, …, an are called coefficients (real numbers).
– x1, x2,…, xn are variables (or indeterminates).
– c is a constant term (real number).
• Example– 2x + 3y – 4z = 0.2
• Non-example– x2+y2=1
kshum ENGG2013 2
Geometry of a linear equation
kshum ENGG2013 3
Two variables: straight line
ax + by = c
Three variables: plane
ax + by + cz = d
System of linear equations
• A system of linear equations (or linear system) is a collection of one or more linear equations.– for example:
• A solution is a list of numbers (s1, s2, …, sn) which satisfies all equalities after substituting xi by si, for i =1,2,…,n.
• The set of all solutions is called the solution set.
kshum ENGG2013 4
Nutrition problem• Find a combination of food A, B, C and D in order to satisfy the nutrition requirement exactly.
• Let xA, xB, xC and xD be the amount of food A, B, C and D respectively.
kshum ENGG2013 5
Food A Food B Food C Food D Requirement
Protein 9 8 3 3 5
Carbohydrate 15 11 1 4 5
Vitamin A 0.02 0.003 0.01 0.006 0.01
Vitamin C 0.01 0.01 0.005 0.05 0.01
Formal notation
• Given a system of m linear equations in n variables
the solution set is defined as
kshum ENGG2013 6
Doublesubscripts
Review of set notation
• Set of Greek letters = {,,,,,,,,,, ,,,,,,,,,,,,,}
• Set of prime numbers = {2,3,5,7,11,13,17,23,29,31,37,41, …}
• Sphere with radius r centered at origin= {(x,y,z): x2+y2+z2=r2}
kshum ENGG2013 7
finite
Countably infinite
Uncountably infinite
Examples of solution sets
kshum ENGG2013 8
{ (x,y): ax + by = c }
-1
-0.5
0
0.5
1
-1
-0.5
0
0.5
1-5
0
5
xy
z
x
y
Consistency
• A linear system is called consistent if there is at least one solution, in other words, if the solution set is non-empty.
kshum ENGG2013 9
x
yInconsistent,no solution
x
y
Consistent
Classification
kshum ENGG2013 10
Linear System
Inconsistent(no solution)
Consistent
Unique solution Infinitely many solutions
Tasks:Determine whether a linearsystem is consistent.If yes, find all solutions.
Short-hand notation using matrix
kshum ENGG2013 11
(2 rows, 4 columns)
(4 rows, 3 columns)Usually called the augmented matrix
The nutrition example
kshum ENGG2013 12
Elementary row operations
1. Interchange two rows2. Multiply a row by a non-zero constant3. Replace a row by the sum of itself and a
constant multiple of another row
kshum ENGG2013 13
Facts: Elementary row operations do not change the solution(s). (There is no loss, and no gain, of information.)
Illustration – row interchange
kshum ENGG2013 14
Illustration – Multiply by constant
kshum ENGG2013 15
2 2
Illustration – Row replacement
kshum ENGG2013 16
(1) (1) – (2) (1) (1) – (2)
How to solve?
• Idea: Apply the three kinds of information-lossless elementary row operations, and transform the linear system into one which is easier to solve.
kshum ENGG2013 17
Linear system in upper triangular matrix form can be easily solved
by backward substitution
Carl Friedrich Gauss
kshum ENGG2013 18
(1777~1855)
The old Deutsche 10-Mark note
Gaussian elimination
• Step 0: Write the linear system in matrix format
• Step 1: Try to transform the matrix into upper triangular form
• Step 2: Solve for the variables one by one, in backward order
kshum ENGG2013 19
Example 1 (row operations)
kshum ENGG2013 20
(2) (2) – (1)
(3)
(2)
(1)
(3) (3) + (2)/2
Solve
Example 1 (backward sub.)
kshum ENGG2013 21
Upper triangular
(3) z = 7/3
(2) – 2y – (7/3) = 1 y = –5/3
(1) x+(–5/3)+(7/3) = 1 x = 1/3
Verify:x+y+z = 1/3 – 5/3 + 7/3 = 3/3 = 1x–y = (1/3) – (– 5/3) = 6/3 = 2y+2z = (– 5/3)+2(7/3) = 9/3 = 3
Solution: x=1/3, y = –5/3, z = 7/3(unique solution)
Example 2 (row operations)
kshum ENGG2013 22
(2) (2) – (1) (3) (3) – (1)
(3) (3) – 2 (2)
Solve
Example 2 (backward sub.)
kshum ENGG2013 23
z can be taken as a free variable.Let z to be any real number.
(1)
(2)
From (2), y = –1 – z
From (1), x +(–1 – z)+3z = 1 x = 2 – 2z
Solution: x= 2– 2z, y = –1–z, z = any real number.
Solution set = {(2 – 2z, –1–z, z): z is any real no.}(Infinitely many solutions)
Note: You can let y tobe the free variable as well,and obtain the solutions interms of y.
Example 2 (cont’d)
• Verification– x+y+3z
=(2 – 2z) + (– 1 – z) + 3z = 1
– x+2y+4z=(2 – 2z) + 2(– 1 – z) + 3z = 0
– x+3y+5z =(2 – 2z) + 3(– 1 – z) + 5z = – 1
kshum ENGG2013 24
Solution: x= 2– 2z, y = –1–z, z = any real numberSolution set = {(2 – 2z, –1–z, z): z is any real no.}
-5
0
5
10
-50
510
-10
-8
-6
-4
-2
0
2
4
x
y
z
Example 3 (row operations)
kshum ENGG2013 25
Solve
(2) (2) – (1) (3) (3) – (1)
(3) (3) – 2(2)
Example 3 (cont’d)
kshum ENGG2013 26
Contradiction, cannot be true
Answer: the linear system is inconsistent
Example 3 (picture)
kshum ENGG2013 27
Cross-section
-5-4
-3-2
-10
1
-2
-1.8
-1.6
-1.4
-1.2
-1
0
0.5
1
1.5
2
2.5
x
y
z
No common intersection
An infinitely long triangular tubeis formed by the three planes
Key concepts
• Three kinds of elementary row operations– The solution set is invariant under any elementary
row operation• Gaussian elimination
– Transform a linear system to upper triangular form– Backward substitution
• Three types of solutions– No solution– Unique solution– Infinitely many solutions
kshum ENGG2013 28
Recommended