Linear Algebra
Lecture 1
Systems of Equations
Instructor:
Dr. Safaa Amin
Associative Professor in Scientific computing Dept.
Faculty of computer and information science
Ain Shams University
1
• Textbook: Howard Anton, "Elementary Linear Algebra",
Ninth Edition, 2004, International student edition, ISBN 007-
124429-8.
Linear Equations
Any straight line in xy-plane can be represented algebraically by an
equation of the form:
𝒂𝟏 𝒙 + 𝒂𝟐 𝒚 = 𝒃
Any straight line in xyz-plane can be represented algebraically by an
equation of the form:
𝒂𝟏 𝒙 + 𝒂𝟐 𝒚 + 𝒂𝟑 𝒛 = 𝒃
General form: define a linear equation in the n variables :
𝒂𝟏 𝒙𝟏 + 𝒂𝟐 𝒙𝟐 +. . . +𝒂𝒏 𝒙𝒏 = 𝒃
Where 𝑎1 , 𝑎2 , 𝑎3 , … 𝑎𝑛 and b are real constants.
The variables in a linear equation are sometimes
𝑥1 , 𝑥2 , … , 𝑥𝑛
called unknowns.
3
Example 1: Linear Equations
The following equations are linear.
𝒙 + 𝟑𝒚 = 𝟕,
𝟏
𝒚 = 𝒙 + 𝟑𝒛 + 𝟏,
𝟐
x1 − 2 x2 − 3x3 + x4 = 7
• Observe that a linear equation does not involve any
products or roots of variables. All variables occur only to
the first power and do not appear as arguments for
trigonometric, logarithmic, or exponential functions.
4
This is not a Linear System
.
𝑒 𝑥 − 2𝑐𝑜𝑠𝑦 + 𝑧 = 6
𝑥 2 + 3𝑦 − 𝑧 = 10
Linear Equations
• A solution of a linear equation is a sequence
of n numbers such that the equation is
satisfied.
• The set of all solutions of the equation is
called its solution set or general solution of
the equation
Example 2: Finding a Solution Set
• Find the solution of (a ) 4 x − 2 y = 1
• Solution(a)
1
𝑦 = 2𝑥 − Assign x an arbitrary value ,we obtain
2 1 1 1
x = t1 , y = 2t1 − or x = t2 + , y = t2
2 2 4
1 1 1 1 1
= t1𝑥, y== 2t1𝑦− + or
xOr x = t2 + , y = t2
2 2 4 2 4
t1, t 2
• arbitrary numbers are called parameter.
• for example 11 11
t1 = 3 yields the solution x = 3, y = as t 2 =
2 2
7
Example 2: Finding a Solution Set
• Find the solution of (b) x1 − 4 x2 + 7 x3 = 5.
• Solution(b)
we can assign arbitrary values to any two variables and
solve for the third variable.
• for example
x1 = 5 + 4s − 7t , x2 = s, x3 = t
• where s, t are arbitrary values
8
System of Linear Equation
• A finite set of linear equations in the
variables x1 , x2 ,..., xn a11 x1 + a12 x2 + ... + a1n xn = b1
is called a system of linear equations or a a21 x1 + a22 x2 + ... + a2 n xn = b2
linear system .
• A sequence of numbers am1 x1 + am 2 x2 + ... + amn xn = bm
s1 , s2 ,..., sn is called a solution of the
system. An arbitrary system of m
linear equations in n unknowns
• A system has no solution is said to be
inconsistent ; if there is at least one
solution of the system, it is called
consistent.
9
Systems of Linear Equation
• Every system of linear equations has either no
solutions, exactly one solution, or infinitely many
solutions.
• A general system of two linear equations:
a1 x + b1 y = c1 (a1 , b1 not both zero)
a2 x + b2 y = c2 (a2 , b2 not both zero)
• Two lines may be parallel -> no solution
• Two lines may intersect at only one point
-> one solution
• Two lines may coincide
-> infinitely many solution
10
Linear Systems in Two Unknowns
INCONSISTENT
CONSISTENT
Consistent and inconsistent system
• A system of equations can be consistent or inconsistent. What does
that mean?
A system of equations 𝑨 𝑿 =𝑩
is consistent if there is a solution, and it is inconsistent if there is no
solution. However, a consistent system of equations does not mean a
unique solution, that is, a consistent system of equations may have a
unique solution or infinite solutions
[A][X]= [B]
Consistent System Inconsistent System
Unique Solution Infinite Solutions
Example 1
Give examples of consistent and inconsistent system of
equations.
Solution
a) The system of equations
𝟐𝒙 + 𝟒𝒚 = 𝟔 2 4 x 6
𝒙 + 𝟑𝒚 = 𝟒 1 3 y = 4
is a consistent system of equations as it has a unique
solution, that is,
x 1
y = 1
Example 1 (cont.)
b) The system of equations
2x + 4 y = 6 2 4 x 6
1 2 y = 3
x + 2y = 3
*-2
0+0=0
• is also a consistent system of equations but it has
infinite solutions as given as follows.
• you can see that they are the same equation.
• Hence, any combination of (x, y ) that satisfies,
2x + 4 y = 6 2𝑥 = 6 − 4𝑦 → 𝑥 = 3 − 2𝑦
𝑦 𝑖𝑠 𝑓𝑟𝑒𝑒 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑦 = 𝑡 𝑎𝑛𝑑 𝑥 = 3 − 2𝑡
(x, y ) = (1,1)
Example 2 (cont.)
c) The system of equations
𝟐𝒙 + 𝟒𝒚 = 𝟔 2 4 x 6
*-2 𝒙 + 𝟐𝒚 = 𝟒 1 2 y = 4
0 + 0 = −2
is inconsistent as no solutions exists.
Linear Systems
in Three Unknowns
Homogeneous and
Non-Homogeneous System
a11 x1 + a12 x2 + ... + a1n xn = b1
a21 x1 + a22 x2 + ... + a2 n xn = b2
am1 x1 + am 2 x2 + ... + amn xn = bm
if 𝑏1 = 𝑏2 = … = 𝑏𝑚 = 0
𝑡ℎ𝑒𝑛 𝑡ℎ𝑒 𝐿𝑖𝑛𝑒𝑎𝑟 𝑠𝑦𝑠𝑡𝑒𝑚 𝑖𝑠 𝑯𝒐𝒎𝒐𝒈𝒆𝒏𝒆𝒐𝒖
Otherwise, if at least one of theses b’s ≠ 𝟎
𝑡ℎ𝑒𝑛 𝑡ℎ𝑒 𝐿𝑖𝑛𝑒𝑎𝑟 𝑠𝑦𝑠𝑡𝑒𝑚 𝑖𝑠 Non-Homogeneous
Gaussian Elimination Method
System of
Matrix Augmente
Linear
Form d Matrix
Equation
Elementary
Row
Operations
Back Row
Solution
substitution Echelon
Set
algorithm Form
Matrix Form
a11 x1 + a12 x2 + ... + a1n xn = b1
a21 x1 + a22 x2 + ... + a2 n xn = b2
am1 x1 + am 2 x2 + ... + amn xn = bm
This system of equation can be rewritten in Matrix Form
𝐴𝑥 = 𝐵
𝑎11 𝑎12 … 𝑎1𝑛
𝐴 = 𝑎21 𝑎22 … 𝑎2𝑛 Coefficient Matrix
𝑎31 𝑎32 . . 𝑎3𝑛
𝑥1 𝑏1
𝑥2 𝑏2
𝑢𝑛𝑘𝑛𝑜𝑤𝑛 𝑣𝑒𝑐𝑡𝑜𝑟 𝑥 = . R.H.S vector B = .
: :
𝑥𝑛 𝑏𝑛
Augmented Matrices
◼ augmented matrix for the
system. a11 x1 + a12 x2 + ... + a1n xn = b1
◼ Note: must be written in a21 x1 + a22 x2 + ... + a2 n xn = b2
the same order in each
equation as the unknowns
and the constants must be
am1 x1 + am 2 x2 + ... + amn xn = bm
on the right.
1th column
a11 a12 ... a1n b1 1th row
a a ... a b
21 22 2n 2
m1 m 2
a a ... a mn b m
20