CSC2206: Linear Algebra
Engr.Aneel Ahmed
Assessments
3 Quizzes: 30 Marks (10 Marks each) You
will be notified 1 Week in advance
2 Assignments: 10 Marks (5 Marks each)
Mid Term Exam (8th Week): 20 Marks
Final Exam (17th Week) : 40 Marks
Class Conduct
Absences from class
Late in class
Assignment submission
Absence from Mid Term or Final Exam
Cheating
Anything you want to ask, ASK NOW !!
Classification by Linear or Non Linear
Linear differential equations are characterized by two
properties:
1. Dependent variable y and all its derivatives are of
first degree, i.e. power of each term involving y is 1
2. Each coefficient depends on only the independent
variable x. For example:
3
2
d
y
d
y
dy
3
2
x 3 x 2 3 x 4 y e x
dx
dx
dx
2
d3y
d
y dy
2
3 y 0 and y 2 2 x
dx
dx dx
POWER NOT 1
Coefficient depends on y
3rd Order
Linear
3rd & 2nd order
Non-Linear
Applications of Linear Systems
To solve problems using a linear system
1. Determine the unknown quantities
2. Let different variables represent those
quantities
3. Write a system of equations – one for each
variable
Example : In a recent year, the national average spent on two
athletes, one female and one male, was $6050 for Division I-A
schools. However, average expenditures for a male athlete
exceeded those for a female athlete by $3900. Determine how
much was spent per athlete for each gender.
Applications of Systems
Solution Let x = average expenditures per male
y = average expenditures per female
Average spent on
x y
one male and one
6050
female
2
x y 12,100
x
y
12100
(1)
x
y
(2)
2x
3900
16000
x 8000
Average Expenditure per male: $8000, and
per female: from (2) y = 8000 – 3900 = $4100.
Linear Equation
A linear equation in the variables x1,x2,……, xn
is an equation that can be written in the form:
where
are n distinct variables,
are real numbers, and at
least one of the a’s is not zero. For
example,
2 x1 4 x2 x3 7
or
2 x1 3x3 1
Linear Equation: Notes
1. Linear equations have no products or roots of
variables and no variables involved in
trigonometric, exponential, or logarithmic
functions. For example,
2 x1 4 x2 x1 x2
or
x1 2 x 2 4
are not linear due to the presence of x1 x2 &
x2
2. Variables appear only to the first power i.e. where the
variables are of first-degree. For example,
2 x1 4 x2 7 is not linear
2
Example: Linear or Nonlinear
Linear ( a ) 3 x 2 y 7
1
(b) x y z 2
2
Linear
2
(
c
)
x
2
x
10
x
x
0
(
d
)
(
sin
)
x
4
x
e
1
2
3
4
Linear
Linear
1
2
2
Exponentia l
Nonlinear ( e ) xy z 2
( f ) ex 2 y 4
Nonlinear
product of variables
Nonlinear ( g ) sin x1 2 x2 3 x3 0
trigonomet ric functions
(h )
1 1
4
x y
Nonlinear
not the first power
Linear System
A system of linear equations i.e. Linear
System is a collection of linear equations
involving the same set of variables, say
x1,x2,……, xn . For example:
x1 2 x2 1
x1 3 x2 3
In summary, If all equations in a system are
linear, the system is a system of linear
equations, or a linear system.
Linear System: Example
The following is a system of 3 linear equations in 3 variables.
x1 - x2 + x3 = 2
3x1 + x2 - x3 = 2
2x1+ 2x2 + x3 = 6
The following is a system of 4 linear equations in 5 variables.
x1 + 3x2 + 2x3
+ x5
- x1 - x2 - x3 + x 4
=0
=1
4x2 + 2x3 + 4x4 + 3x5 = 3
x1 + 3x2 + 2x3 - 2x4
=0
Linear System: Exercise
Which of the following are systems of linear equations?
1. x12 + x22 = 1
No
2. x1 + x2 = x3 + x4 + 1,
x1 + x3 = x2 + x4 + 2,
x1 + x4 = x2 + x3 + 3
Yes
3. xy = 1 No
4. x1/2 - y1/2 + z1/2 = 2 No
5. u + v + w = 21/2,
u2 + v2 + w2 = 32/3
No
Linear System: Generalization
• A general system of m linear equations in n
unknown has the form
a11 x1 a12 x 2 ...... a1n x n b1
a 21 x1 a 22 x 2 ...... a 2 n x n b2
(1)
a m1 x1 a m 2 x 2 ...... a mn xn bm
• The coefficients of the unknowns in the linear
system (1) can be abbreviated as aij, where i
denotes the row and j denotes the column.
• The numbers b1,b2, bm are called the
constants of the system.
Solution of the system
A solution of the system is a list (s1,s2,……, sn )
of numbers that makes each equation of the
linear system a true statement when the
values s1,s2,……, sn are substituted for
x1,x2,……, xn respectively, i.e.
A solution of a linear equation in n variables:
a1 x1 a 2 x2 a 3 x3 a n x n b
x1 s1 , x2 s2 , x3 s3 , , x n sn
a1 s1 a 2 s2 a 3 s3 a n sn b
Solution set or General Solution
the set of all solutions of a linear equation
Solution of the system (Contd.)
A solution for a single equation is any point
that lies on the line for that equation.
A solution for a system of equations is any
point that lies on each line in the system.
Consistent:
A system of linear equations has at least one
solution.
Inconsistent:
A system of linear equations has no solution.
Solution of the system (Contd.)
Every system of linear equations has either
(1) exactly one solution,
(2) infinitely many solutions, or
(3) no solution.
Note: Two systems of linear equations are
called equivalent if they have precisely the
same solution set.
Solution: Independent - Consistent
(1) If a consistent system has exactly one solution then it
is said to be independent. An independent system will
occur when two lines have different slopes.
independent
consistent
Case 1: The lines
intersect at a point (x,
y),
the solution.
Solution: dependent - Consistent
If a consistent system has more than one solution, then it
is said to be dependent. A dependent system will occur
when two lines have the same slope and the same y
intercept. In other words, the two equations are identical.
The graphs of the lines will coincide with one another and
there will be an infinite number of points of intersection.
dependent
consistent
Case 2: The lines
coincide and there
are infinitely many
solutions (all points
on the line).
Solution: Inconsistent
An inconsistent linear system is one that has no
solutions. This will occur when two lines have the
same slope but different y intercepts. In this case,
the lines will be parallel and will never intersect.
inconsistent
Case 3: The lines
are parallel so there
is no solution.
Solution of the system: Summary
Consistent
Inconsistent
Dependent
One solution
No solution
Lines intersect
Lines are parallel
Infinite number of
solutions
Same line
Exercise: Solution of a system of linear
equations)
(1) x y 3
x y 1
two intersecti ng lines
exactly one solution
(2) x y 3
2x 2 y 6
two coincident lines
inifinite number
(3) x y 3
x y 1
two parallel lines
no solution
Methods for Solving a System
1. By Graphing
2. Matrices
3. Method of substitution
4. Method of elimination
1. Solve by graphing
One method to find the solution of a system of linear
equations is to graph each equation on a coordinate
plane and to determine the point of intersection (if it
exists).
The drawback of this method is that it is not very
accurate in most cases, but does give a general
location of the point of intersection.
Lets take a look at an example: Solve the system by
graphing:
3x + 5y = -9
x+ 4y = -10
Example (Contd.)
3x + 5y = -9
x+ 4y = -10
Intercept method:
If x = 0, y= -9/5
If y = 0 , x = - 3
Plot points and draw line
(2,-3)
Second line:
(0, -5/2) , ( -10,0)
• From the graph we see that the point of
intersection is (2,-3).
• Check: 3(2)+5(-3)= -9 and 2+4(-3)= -10 both
check.
Exercise
Solve the system by graphing:
2x + 3 = y
x + 2y = -4
The solution is (-2,-1)
Exercise
Determine whether either of the points (–1, –5) and (0, –2) is
a solution to the given system of equations.
y = 3x – 2 --->Eq:1
y = –x – 6 --->Eq:2
Solution: To check the given possible solutions, just plug the xand y-coordinates into the equations, and check to see if they
work.
checking (–1, –5) for Eq:1
(–5) = 3(–1) – 2
–5 = –3 – 2
–5 = –5 (solution checks)
For Eq:2
(–5) ?=? –(–1) – 6
–5 ?=? 1 – 6
–5 = –5 (solution checks)
Since the given point
(-1,-5) works in each
equation, it is a solution to
the system.
Exercise (Contd.)
checking (0, –2) for Eq:1
(–2) = 3(0) – 2
–2 =0 – 2
–2 = –2 (solution checks)
So the solution works in one of the equations. But to solve the
system, it has to work in both equations. Continuing the check:
For Eq:2
(–2) =–(0) – 6
–2 = 0 – 6
–2 = –6
But –2 does not equal –6, so this "solution" does
not check. Then the answer is:
only the point (–1, –5) is a solution to the system
2.Matrices
• A matrix is a rectangular
array of numbers written
within brackets. Here is an
example of a matrix which
has three rows and three
columns: The subscripts
give the “address” of each
entry of the matrix. For
example the entry
a23
• Is found in the second row
and third column
a11
a
21
a
31
a12
a22
a32
a13
a23
a33
Matrix solutions of linear systems
When solving systems of linear
equations, the coefficients of the
variables played an important role.
We can represent a linear system
of equations using what is called an
augmented matrix, a matrix which
stores the coefficients and constants
of the linear system and
then manipulate the augmented
matrix to obtain the solution of the
system. Here is an example:
x + 3y = 5
2x – y = 3
1 3 5
2 1 3
Augmented matrix
In general, the essential information of a system of linear equations
a11x1
+ a12x2 + ... + a1nxn
=
b1
a21x1
+ a22x2 + ... + a2nxn
=
b2
=
bm
...
...
...
am1x1
+ am2x2
+ amnxn
is contained in the augmented matrix
[A b] =[
a11
a12
...
a1n
b1
a21
a22
...
a2n
b2
:
:
:
:
am1
am2
amn
bm
...
]
Augmented matrix (contd.)
which is made up of the coefficient matrix
a11
a12
...
a1n
a21
a22
...
a2n
:
:
am1
am2
A=[
]
:
...
amn
and the right side vector.
b1
b=[
b2
:
bm
]
Generalization
• Linear system:
a11 x1 b11 y1 k1
a21 x1 b21 x2 k2
• Associated augmented
matrix:
a11
a21
a12 k1
a22 k2
Exercise: 1
Find the augmented matrix
x1
+ 3x2
+ 2x3
- x1
- x2
- x3
+ x4
4x2
+ 2x3
+ 4x4
+ 3x2
+ 2x3
- 2x4
1
-1
0
1
3
-1
4
3
x1
+ x5
+ 3x5
=
0
=
1
=
3
=
0
ANSWER
[
2
-1
2
2
0
1
4
-2
1
0
3
0
0
1
3
0
]
Exercise: 2
Recover system of linear equations from the
augmented matrix.
[
a
1
1
1
a
1
1
1
a
]
ANSWER
ax1
x1
x1
+ x2
+ ax2
+ x2
=
=
=
1
1
a
Elementary Row Operations
The basic method for solving a system of linear equations
is to replace the given system by a new system that has
the same solution set but which is easier to solve.
Since the rows of an augmented matrix correspond to the
equations in the associated system. New systems is
generally obtained in a series of steps by applying the
following three types of operations to eliminate unknowns
systematically. These are called elementary row
operations.
1. Multiply an equation through by an nonzero constant.
2. Interchange two equation.
3. Add a multiple of one equation to another.
Elementary row operations: Summary
1. Two rows are interchanged:
Ri R j
2. A row is multiplied by a nonzero constant:
kRi Ri
3. A constant multiple of one row is added to
another row:
kR j Ri Ri
Exercise: Elementary row operation
0 1 3 4
1 2 0 3
2 3 4 1
2 4 6 2
1 3 3 0
1 2
5 2
3
1 2 4
0 3 2 1
2 1 5 2
r12
( 12 )
1
r
r13( 2 )
1 2 0 3
0 1 3 4
2 3 4 1
1 2 3 1
1 3 3 0
1 2
5 2
1 2 4 3
0 3 2 1
0 3 13 8
Example:
Using Elementary row Operations(1/4)
x y 2z 9
2 x 4 y 3z 1
add - 2 times
the first equation
to the second
x y 2z
2 y 7 z 1 7
3x 6 y 5z
3x 6 y 5 z 0
add - 2 times
1 1 2 9
the first row
2 4 3 1
to the second
3 6 5 0
9
0
add -3 times
the first equation
to the third
9
1 1 2
add -3 times
0 2 7 17
the first row
to the third
3 6 5
0
Example
Using Elementary row Operations(2/4)
x y 2z
9
2 y 7 z 17
multiply the second
1
equation by
2
x y 2z
3 y 11z 27
9
y 72 z 172
3 y 11z
0
add -3 times
the second equation
to the third
multily the second
2
9 add -3 times
2
9
1 1
1 1
1
0 2 7 17
0 1 7 17 the second row
row by
2
2
2
to the third
0 3 11 27
0 3 11 27
Example:
Using Elementary row Operations(3/4)
x y 2z
9
M ultiply the third
equation by - 2
x y 2z
y 72 z 172
y 72 z 172
z 3
12 z 32
1 1 2
7
0
1
2
0 0 12
9
1
M ultily the third
0
by - 2
172 row
3
2
0
9
1
2
1 72
0
1
Add -1 times the
second equation
to the first
9
Add -1 times the
second row
172
to the first
3
Example 3
Using Elementary row Operations(4/4)
x
112 z
35
2
y 72 z 172
z
1 0 112
7
0
1
2
0 0 1
3
Add - 11
times
2
the third equation
to the first and 72 times
the third equation
to the second
Add - 11
times
2
the third row
to the first and 72
times the third row
to the second
172
3
35
2
The solution x=1,y=2,z=3 is now evident.
1
x
y
2
z 3
1 0 0 1
0 1 0 2
0 0 1 3
Solve using Augmented matrix
Solve
x + 3y =5
2x – y =3
• 1. Augmented system
• 2. Eliminate 2 in 2nd row by row
operation
• 3. Divide row two by -7 to obtain
a coefficient of 1.
• 4. Eliminate the 3 in first row,
second position.
• 5. Read solution from matrix
1 3 5
2
1
3
2 R1 R2
1
3 5
0
7
7
R2 / 7 R2
1 3 5
0
1
1
3 R2 R1 R1
1 0 2
x 2, y 1; (2,1)
0 1 1
Exercise: Solving a system using augmented
matrix methods
x + 2y = 4
x + (1/2)y = 4
1.
2.
3.
4.
5.
6.
7.
Eliminate fraction in second
equation.
Write system as augmented matrix.
Multiply row 1 by -2 and add to row
2
Divide row 2 by -3
Multiply row 2 by -2 and add to row
1.
Read solution : x = 4, y = 0
(4,0)
x 2y 4
1
y 4 2x y 8
2
1
2 4
1 8
2
x
1
0
2 4
3 0
1
0
2 4
1 0
1
0
0 4
1 0
Exercise 2: Solving a system using augmented
matrix methods
10x -2y=6
-5x+y= -3
• 1. Represent as augmented
matrix.
• 2. Divide row 1 by 2
• 3. Add row 1 to row 2 and replace
row 2 by sum
• 4. Since 0 = 0 is always true, we
have a dependent system. The
two equations are identical and
there are an infinite number of
solutions.
10 2 6
5 1 3
5 1 3
5 1 3
5 1 3
0
0
0
Another exercise
Solve
5 x 2 y 7
5
y x 1
2
• Rewrite second equation :
2 y 5x 2
5 x 2 y 2
• Since we have an impossible
equation, there is no solution.
The two lines are parallel and do
not intersect.
5 x 2 y 7
5 x 2 y 2
5 2 7
5 2 2
5 2 7
0
0
5
3. Method of Substitution
The steps for this method are as follows:
1) Solve one of the equations for either x or y.
2) Substitute that result into the other equation
to obtain an equation in a single variable
(either x or y).
3) Solve the equation for that variable.
4) Substitute this value into any convenient
equation to obtain the value of the remaining
variable.
Exercise: Substitution Method
Example Solve the system.
3 x 2 y 11
x y 3
Solution y x 3
3 x 2( x 3) 11
3 x 2 x 6 11
5x 5
x 1
y 1 3
y4
(1)
(2)
Solve (2) for y.
Substitute y = x + 3 in (1).
Solve for x.
Substitute x = 1 in y = x + 3.
Solution set: {(1, 4)}
Exercise 1:
x 2y
5
y 2
(1)
(2)
Sol: By substituting y 2 into (1), we will obtain
x 2( 2 ) 5
x 1
The system has exactly one solution:
x 1, y 2
Exercise 2:
x 2 y 3z 9
y 3z 5
z 2
Sol: Substitute
(1)
(2)
(3)
z 2 into (2)
y 3( 2) 5
y 1
and substitute y 1 and z 2 into (1)
x 2( 1) 3( 2) 9
x 1
The system has exactly one solution:
x 1, y 1, z 2
Use Method of Substitution to solve:
(1)
(2)
STEP 1: Solve for x in (2)
add x and subtract 2
on both sides
STEP 2: Substitute for x in (1)
STEP 3: Solve for y
STEP 4: Substitute y = -11/5 into result in
Step1.
Solution:
Exercise 2
Solve the system
using substitution:
3x - 2y = 7
y = 2x - 3
Solution:
3x 2 y 7
y 2x 3
3 x 2(2 x 3) 7
3x 4 x 6 7
x 1
x 1
y 2 1 3 y 5
4. Method of Elimination
• The method of substitution is not preferable if none of
the coefficients of x and y are 1 or -1. For example,
substitution is not the preferred method for the
system below:
2x – 7y = 3
-5x + 3y = 7
• A better method is elimination by addition. The
following operations can be used to produce
equivalent systems:
– 1. Two equations can be interchanged.
– 2. An equation can be multiplied by a non-zero constant.
– 3. An equation can be multiplied by a non-zero constant
and then added to another equation.
Elimination: Example
• For our system, we will seek to
eliminate the x variable. The
coefficients are 2 and -5. Our goal is
to obtain coefficients of x that are
additive inverses of each other.
• We can accomplish this by
multiplying the first equation by 5,
and the second equation by 2.
• Next, we can add the two equations
to eliminate the x-variable.
• Solve for y
• Substitute y value into original
equation and solve for x
• Write solution as an ordered pair
-5x+3y=7
5(2 x 7 y ) 5(3)
{
2( 5 x 3 y ) 2(7)
2x-7y=3
10 x 35 y 15
10 x 6 y 14
0 x 29 y 29
y 1
2 x 7( 1) { 3
2x 7 3
2 x 4
x 2
( 2, 1)
Elimination Method
Example
Solve the system.
3x 4 y 1
2 x 3 y 12
(1)
(2)
Solution To eliminate x, multiply (1) by –2 and (2)
by 3 and add the resulting equations.
6 x 8 y 2
6 x 9 y 36
17 y 34
y2
(3)
(4)
Elimination Method (Contd.)
Substitute 2 for y in (1) or (2).
3 x 4( 2) 1
3x 9
x3
The solution set is {(3, 2)}.
• Check the solution set by substituting 3 in for x
and 2 in for y in both of the original equations.
Exercise: Solve a system of linear
equations (consistent system)
x 2 y 3z 9
x 3y
4
2 x 5 y 5 z 17
(1)
(2)
(3)
Sol: (1) (2) (4)
x
2x
2y
3z
9
y
3z
5
5y
5z
17
(4)
(1) ( 2) (3) (3)
x 2 y 3z 9
y 3z 5
y z 1
(5)
Exercise (Contd.)
(4) (5) (5)
x 2 y 3z 9
y 3z 5
2z 4
(6)
(6) 12 ( 6)
x 2 y 3z 9
y 3z 5
z 2
So the solution is x 1, y 1, z 2(only one solution)
Solving a System with Dependent
Equations
Example
Solve the system.
4x y 2
8x 2 y 4
(1)
(2)
Solution
Eliminate x by multiplying (1) by 2 and adding the
result to (2).
8x 2 y 4
8 x 2 y 4
00
Each equation is a solution of the other. Choose either equation
and solve for x.
y2
4x y 2 x
4
y 2
The solution set is
, y .e.g. y = –2: {( 24 2 , 2 )} ( 1, 2 )}
4
Solving an Inconsistent System
Example Solve the system.
3x 2 y 4
6x 4 y 7
(1)
(2)
Solution Eliminate x by multiplying (1) by 2 and
adding the result to (2).
6x 4 y 8
6x 4 y 7
0 15
Solution set is .
Inconsistent
System
Exercise: Solve a system of linear equations
(inconsistent system)
x1 3 x 2 x3 1
2 x1 x 2 2 x3 2
x1 2 x 2 3 x3 1
Sol:
(1)
(2)
(3)
(1) ( 2) (2) (4)
(1) ( 1) (3) (5)
x1 3 x2
x3
1
5 x2 4 x3
0
( 4)
5 x2 4 x3 2
(5)
Exercise (Contd.)
( 4 ) ( 1) (5) (5)
x1 3 x2 x3
1
5 x 2 4 x3
0
0 2
(a false statement)
So the system has no solution (an inconsistent
system).
Exercise: Solve a system of linear equations
(infinitely many solutions)
x1
x1
x2 x3 0
3 x3 1
3 x2
1
Sol: (1) ( 2 )
x1
x1
(1)
(2)
(3)
3 x3 1
x3 0
1
(1)
(2)
(3)
3 x3 1
x3 0
3 x3 0
(4)
x2
3 x2
(1) (3) (3)
x1
x2
3 x2
Exercise (Contd.)
x1
x2
3 x2
x3
1
0
x 2 x3 , x1 1 3 x3
let x3 t
then x1 3t 1,
x2 t ,
tR
x3 t ,
So this system has infinitely many solutions.
Solving a Nonlinear System of Equations
Example Solve the system.
3x 2 2 y 5
x 3y 4
(1)
(2)
Solution Choose the simpler equation, (2), and
solve for y since x is squared in (1).
x 3 y 4
4 x
y
3
Substitute 43 x for y into (1) .
(3)
Solving a Nonlinear System of Equations (Contd.)
4 x
3 x 2
5
3
9 x 2 2( 4 x ) 15
2
9x2 2x 7 0
7
(9 x 7 )( x 1) 0 x 1 or x
9
Substitute these values for x into (3).
4 79
43
y
3
27
or
4 1
y
1
3
43
, 1, 1.
The solution set is 79 , 27
Summary
A system of equations is a collection of two or more
equations, each containing one or more variables.
A solution of a system of equations consists of values for
the variables that reduce each equation of the system to a
true statement.
To solve a system of equations means to find all solutions
of the system.
When a system of equations has at least one solution, it is
said to be consistent; otherwise it is called inconsistent.
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )