Professional Documents
Culture Documents
Introduction to
Systems of Linear Equations
李龍豪 (Lung-Hao Lee)
助教信箱:ncuee.course.la@gmail.com
Linear Equations
• De nition: Linear Equations (線性⽅程式)
A linear equation in the n variables x1, x2, … , xn to be
one that can be expressed in the form
a1 x1 + a2 x2 +!+ an xn = b
where a1, a2, … , an and b are constants and the a’s are
not all zero (a1, a2, … , an, b 皆為常數,且所有a不全為0)
2
fi
Homogeneous Linear Equations
a1 x1 + a2 x2 +!+ an xn = 0
• Examples
x1 − 2x2 − 3x3 + x4 = 0
2
−x + 5y − z = 0
3
3
Examples for Linear Equations
• A linear equation does not involve any products (乘積) or
roots (開⽅) of variables. All variables occur to the rst
power and do not appear, for example, as arguments of
trigonometric (三⾓函數), logarithmic (對數函數) or
exponential functions (指數函數).
x1 − 2x2 − 3x3 + x4 = 0
1
x + 3y = 7 x − y + 3z = −1 x1 + x2 + ...+ xn = 1
2
sin x + y = 0 x1 + 2x2 + x3 = 1
4
fi
System of Linear Equations
• A nite set of linear equations is called system of linear
equations (線性⽅程組), or a linear system (線性系統).
The variables are called unknowns (未知數).
5x + y = 3
Unknowns: x and y
2x − y = 4
4x1 − x2 + 3x3 = −1
Unknowns: x1, x2, x3
3x1 + x2 + 9x3 = −4
5
fi
Solutions
• A general linear system of m equations in the n unknowns
x1, x2, …, xn can be written as
a11 x1 + a12 x2 +!+ a1n xn = b1
a21 x1 + a22 x2 +!+ a2n xn = b2
!
am1 x1 + am 2 x2 +!+ amn xn = bm
6
Ordered n-tuple
• Examples Solutions
5x + y = 3 x = 1, y = −2 (1, -2)
2x − y = 4
4x1 − x2 + 3x3 = −1
x1 = 1, x2 = 2, x3 = −1 (1, 2, -1)
3x1 + x2 + 9x3 = −4
7
Linear Systems in Two Unknowns
a1 x + b1 y = c1
a2 x + b2 y = c2
8
Three Possibilities
• The lines may be parallel and distinct (平⾏且相異)
9
Linear Systems in Three Unknowns
a1 x + b1 y + c1z = d1
a2 x + b2 y + c2 z = d2
a3 x + b3 y + c3z = d3
10
Consistent vs. Inconsistent
• A linear system is consistent (相容的) if it has at least one
solution. A consistent linear system of two equations in
two unknowns has either one or in nitely many
solutions. The same is true for a linear system of three
equations in three unknowns
11
fi
fi
A Linear System with One Solution
12
fi
fi
A Linear System with No Solutions
13
fi
A Linear System with
In nitely Many Solutions (1)
• Solve the linear system 4x − 2y = 1
16x − 8y = 4
• Solution
Eliminate x from the second equation by adding -4 times the
rst equation to the second
0=0
The second equation doesn’t impose any restrictions on x and
y and hence can be omitted.
4x − 2y = 1
One way to describe the solution set is to solve this equation
for x in terms of y to obtain 1 1 1 1
x= + y x = + t, y = t
4 2 4 2
Assign an arbitrary value t (called a parameter 參數) to y
This allows to express the solutions by the pair of equations
(called parametric equations 參數⽅程式)
14
fi
fi
A Linear System with
In nitely Many Solutions (2)
x − y + 2z = 5
• Solve the linear system 2x − 2y + 4z = 10
3x − 3y + 6z = 15
• Solution
This system can be solved by inspection, since the
second the third equations are multiples of the rst.
15
fi
fi
Argumented Matrix
• The required computations can be made more
manageable by simplifying notation and standardizing
procedures
Augmented Matrix
a11 x1 + a12 x2 +!+ a1n xn = b1 ⎡ a11 a12 ! a1n b1 ⎤
⎢ ⎥
a21 x1 + a22 x2 +!+ a2n xn = b2 ⎢ a21 a22 ! a2n b2 ⎥
⎢ ! ⎥
! ⎢
!
⎥
am1 x1 + am 2 x2 +!+ amn xn = bm ⎢⎣ am1 am 2 ! amn bm ⎥
⎦
16
Algebraic Operations
• The basic method for solving a linear system is to perform
algebraic operations (代數運算)
17
Elementary Row Operations
• Since the rows (horizontal lines) of an augmented matrix
correspond to the equations in the associated system, these
three operations correspond to the operations called
elementary row operations (基本列運算)
⎡ a11 a12 ! a1n b1 ⎤
⎢ ⎥
⎢ a21 a22 ! a2n b2 ⎥
⎢ ! ! ⎥
⎢ ⎥
⎢⎣ am1 am 2 ! amn bm ⎥
⎦
x + y + 2z = 9 ⎡ 1 1 2 9 ⎤
2x + 4y − 3z = 1 ⎢ ⎥
⎢ 2 4 −3 1 ⎥
3x + 6y − 5z = 0 ⎢⎣ 3 6 −5 0 ⎥⎦
x + y + 2z = 9 ⎡ 1 1 2 9 ⎤
⎢ ⎥
2y − 7z = −17 ⎢ 0 2 −7 −17 ⎥
⎢⎣ 3 6 −5 0 ⎥⎦
3x + 6y − 5z = 0
19
fi
Using Elementary Row Operations (2)
x + y + 2z = 9 ⎡ 1 1 2 9 ⎤
⎢ ⎥
2y − 7z = −17 ⎢ 0 2 −7 −17 ⎥
3x + 6y − 5z = 0 ⎢⎣ 3 6 −5 0 ⎥⎦
x + y + 2z = 9
⎡ 1 1 2 9 ⎤
2y − 7z = −17 ⎢ ⎥
⎢ 0 2 −7 −17 ⎥
⎢⎣ 0 3 −11 −27 ⎥⎦
3y − 11z = −27
20
fi
Using Elementary Row Operations (3)
x + y + 2z = 9 ⎡ 1 1 2 9 ⎤
⎢ ⎥
2y − 7z = −17 ⎢ 0 2 −7 −17 ⎥
⎢⎣ 0 3 −11 −27 ⎥⎦
3y − 11z = −27
• Multiply the second equation (row) by 1/2 to obtain
x + y + 2z = 9
⎡ 1 1 2 9 ⎤
7 17 ⎢ ⎥
y− z = − ⎢ 0 1 − 7 − 17 ⎥
2 2 ⎢ 2 2 ⎥
3y − 11z = −27 ⎢ 0 3 −11 −27 ⎥
⎣ ⎦
21
Using Elementary Row Operations (4)
x + y + 2z = 9 ⎡ 1 1 2 9 ⎤
⎢ ⎥
7 17 ⎢ 0 1 − 7 17 ⎥
y− z = − −
2 2 ⎢ 2 2 ⎥
⎢ 0 3 −11 −27 ⎥
3y − 11z = −27 ⎣ ⎦
x + y + 2z = 9 ⎡ ⎤
⎢ ⎥
7 17 ⎢ 1 1 2 9 ⎥
y− z = − ⎢ 7 17 ⎥
2 2
⎢ 0 1 −2 −
2 ⎥
1 3 ⎢ ⎥
− z=− ⎢ 0 0 −1 3 ⎥
2 2 −
⎢⎣ 2 2 ⎥⎦
22
Using Elementary Row Operations (5)
⎡ ⎤
x + y + 2z = 9 ⎢ ⎥
⎢ 1 1 2 9 ⎥
7 17 ⎢ 7 17 ⎥
y− z = − ⎢ 0 1 −2 −
2 ⎥
2 2 ⎢ ⎥
1 3 ⎢ 0 0 −1 −
3 ⎥
− z=− ⎢⎣ 2 2 ⎥⎦
2 2
• Multiply the third equation (row) by -2 to obtain
x + y + 2z = 9 ⎡ 1 1 2 ⎤
9
7 17 ⎢ ⎥
y− z = − ⎢ 0 1 −7 −
17 ⎥
2 2 ⎢ 2 2 ⎥
⎢ 0 0 1 3 ⎥
z=3 ⎣ ⎦
23
Using Elementary Row Operations (6)
x + y + 2z = 9 ⎡ 1 1 2 9 ⎤
⎢ ⎥
7 17 ⎢ 0 1 −7 −
17 ⎥
y− z = − ⎢ 2 2 ⎥
2 2
⎢ 0 0 1 3 ⎥
z=3 ⎣ ⎦
11 35 ⎡ ⎤
x + z= ⎢ 1 0
11 35
⎥
2 2 ⎢ 2 2 ⎥
7 17 ⎢ 7 17 ⎥
y− z = − ⎢ 0 1 −2 −
2 ⎥
2 2 ⎢ ⎥
⎢ 0 0 1 3 ⎥
⎢ ⎥
z=3 ⎣ ⎦
24
fi
Using Elementary Row Operations (7)
11 35 ⎡ ⎤
x + z= ⎢ 1 0
11 35
⎥
2 2 ⎢ 2 2 ⎥
7 17 ⎢ 7 17 ⎥
⎢ 0 1 − − ⎥
y− z = − ⎢
2 2
⎥
2 2 ⎢ 0 0 1 3 ⎥
⎢ ⎥
z=3 ⎣ ⎦
• Add -11/2 times the third equation (row) to the rst and the
7/2 times the third equation (row) to the second to obtain
x =1
⎡ 1 0 0 1 ⎤
y =2 ⎢ ⎥
⎢ 0 1 0 2 ⎥
z=3 ⎢⎣ 0 0 1 3 ⎥⎦
26