100% found this document useful (1 vote)
198 views35 pages

System of Linear Equations - Spring - 20-21

The document discusses systems of linear equations (SLE). Some key points: 1) A SLE is a group of two or more linear equations containing the same variables. SLEs arise in many applications including curve fitting, network analysis, and cryptography. 2) A solution to a SLE is a set of values for the variables that satisfies all equations simultaneously. SLEs can be consistent (have a solution), inconsistent (no solution), or dependent (infinitely many solutions). 3) Consistency of a SLE can be determined by comparing the ranks of the coefficient matrix and augmented matrix. If the ranks are equal, the system is consistent. 4) Examples illustrate SLEs with a unique solution (lines intersect

Uploaded by

maimona rahman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
198 views35 pages

System of Linear Equations - Spring - 20-21

The document discusses systems of linear equations (SLE). Some key points: 1) A SLE is a group of two or more linear equations containing the same variables. SLEs arise in many applications including curve fitting, network analysis, and cryptography. 2) A solution to a SLE is a set of values for the variables that satisfies all equations simultaneously. SLEs can be consistent (have a solution), inconsistent (no solution), or dependent (infinitely many solutions). 3) Consistency of a SLE can be determined by comparing the ranks of the coefficient matrix and augmented matrix. If the ranks are equal, the system is consistent. 4) Examples illustrate SLEs with a unique solution (lines intersect

Uploaded by

maimona rahman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Matrices, Vectors, Fourier Analysis Spring 2020-2021

Chapter-2

System of Linear Equations (SLE)


In mathematics, linear systems are the basis and a fundamental part of linear algebra, a subject which
is used in most parts of modern mathematics. Computational algorithms for finding the solutions are
an important part of numerical linear algebra, and play a prominent role in engineering, physics,
chemistry, computer science, and economics. A system of linear equations is a group of two or more
linear equations containing the same variables. In a system of equations there is more than one
unknown since the equations contain more than one variable. We will explore applications that involve
systems of linear equations and look at how to set up a system of equations with given information.
Systems of linear equations arise in a wide variety of applications. System of linear equations arises in
the problem of polynomial curve fitting, network analysis and analysis of an electric circuit. System
of linear equations also arises when we want to solve mixture problems and distance-rate-time
problem. One of the most frequent occasions where linear systems of 𝑛 equations in 𝑛 unknowns arise
is in least-squares optimization problems. Least squares problems lead to square (i.e. 𝑛 × 𝑛) linear
systems of equations. Also systems of linear equations arise in the problem of graph theory and
cryptography. In cryptanalysis (breaking codes mathematically) we use linear in solving systems of
equations related to both a grammar and language in cipher text.

Linear equation:
An equation in two or more variables (unknowns) is linear if it contains no products of unknowns or
exponent of each unknowns is 1.

Example:
1. 2 x + 3 y = 8 (linear )
2. x1 + x2 + .... + xn = 1 (linear )
3. x 2 + 4 x = 8 (non − linear )

Solution:
A solution of linear equation a1 x1 + a 2 x2 + ... + a n xn = b is a sequence of 𝑛 numbers 1 ,  2 ..., n such
that the equation is satisfied when we substitute x1 = 1 , x2 =  2 ,..., xn =  n . The set of all such solutions
of the linear equation is called a solution set.
x + y = 2
 has no solution.
x + y = 0
System of linear equations:
A group of 𝑚 linear equations of 𝑛 variables x1 , x2 ,..., xn are of the form
a11 x1 + a12 x2 + . . . + a1n xn = b1 
a21 x1 + a22 x2 + . . . + a2 n xn = b2 
. . . . . . 
 .............(1)
. . . . . . 
. . . . . . 

am1 x1 + am 2 x2 + . . . + amn xn = bm 

1
Matrices, Vectors, Fourier Analysis Spring 2020-2021

is known as system of linear equation. Here the co-efficient a i j , i = 1,2,...m, j = 1,2,...,n of the
variable and the free term b i , i = 1,2,...,m are real numbers.
By a solution (set) of a system means such a set of real numbers that satisfies each equation in a system.

Solution of a system of linear equations:


A sequence of numbers 1 , 2 ..., n is called solution of the system of linear equations given by (1) if
1 ,  2 ..., n is a solution of every equation in the system.

Degenerate and non-degenerate linear equation:


A linear equation is said to be degenerate if it has the form 0 x1 + 0 x2 + ... + 0 xn = b . That is, if every
coefficient of the variable is equal to zero. The solution of such a generate linear equation is as follows:
(i) If the constant b  0 , then the above equation has no solution.
(ii) If the constant 𝑏 = 0, then every vector u = ( 1 ,  2 , ......, n ) is a solution of the above
equation.
The general linear equation a1 x1 + a 2 x2 + ..... + a n xn = b is called non-degenerate linear equation.

Consistent and inconsistent equations:


A system of linear equations is called consistent if it has at least one set of solution. A system of linear
equations is called inconsistent if it has no solution.

Consistency theorem: The system of linear equations 𝐴𝑋 = 𝐵 (𝑚 equations and 𝑛 unknowns) is


consistent (i.e. there is at least one solution of the system) if the coefficient matrix 𝐴 and the augmented
matrix (𝐴|𝐵) have the same rank.

Determinate and Indeterminate:


A consistent system is called determinate if it has a unique solution and indeterminate if it has more
than one solution.
An indeterminate system of linear equation always has an infinite number of solutions.

Then 3 cases arise:


► SLE is inconsistent  straight lines do not intersect (i.e., parallel);
► SLE has a unique solution  all straight lines pass through a single point;
► SLE is redundant  actually one straight line, with which others coincide, exists.

System of
Linear Equation

Inconsistent Consistent

More than one


No solution Unique solution
solution

y y y

2
Matrices, Vectors, Fourier Analysis Spring 2020-2021

x x x

An inconsistent system A unique system Infinitely many solution system


(no common point) (only 1 common point) (overlapping lines)

Example: Following augmented matrices illustrate the consistency of the linear system.

1 2 3 2 1 2 3 2 1 2 3 2
(i) [A|B] = [0 1 4| 3], (ii) [A|B] = [0 1 4| 3], (iii) [A|B] = [0 1 4| 3].
0 0 1 2 0 0 0 2 0 0 0 0
rank(𝐴) = rank[𝐴|𝐵] = 3 rank(𝐴) = 2; rank[𝐴|𝐵] = 3 rank(𝐴) = 2;
So, this system is consistent. So, this system is inconsistent. rank[𝐴|𝐵] = 2
There is no solution for this So, this system is consistent
system. but infinitely many solutions.

Example: Test the consistency of the following system of linear equations


3𝑥1 + 4𝑥2 − 𝑥3 + 2𝑥4 = 1
𝑥1 − 2𝑥2 + 3𝑥3 + 𝑥4 = 2 .
3𝑥1 + 14𝑥2 − 11𝑥3 + 𝑥4 = 3

Solution: The corresponding augmented matrix is


3 4 −1 2 1 ~ 1 −2 3 1 2
(1 −2 3 1 |2) 𝑟1 ↔ 𝑟2 (3 4 −1 2 |1)
3 14 −11 1 3 3 14 −11 1 3
~ 1 −2 3 1 2
𝑟2 → 𝑟2 − 3𝑟1 (0 10 −10 −1|−4)
𝑟3 → 𝑟3 − 3𝑟1 0 20 −20 −2 −3

~ 1 −2 3 1 2 ~ 1 −2 3 1 2
1 2
( | −4) 1 (0 1 −1 − 10|− 5)
𝑟3 → 𝑟3 − 2𝑟2 0 10 −10 −1 𝑟2 → 10 𝑟2
0 0 0 0 5 0 0 0 0 1
Now rank(𝐴) = 2, rank(𝐴|𝑏) = 3. Since rank(𝐴) ≠ rank(𝐴|𝑏) , the system is inconsistent.

Example: A system of linear equations with exactly one solution


Consider the system
2x − y = 1
3x + 2 y = 12
Solving the first equation for y in terms of x , we obtain the equation
y = 2x − 1
Substituting this expression for y into the second equation yields
3x + 2(2 x − 1) = 12
 3x + 4 x − 2 = 12
3
Matrices, Vectors, Fourier Analysis Spring 2020-2021

 7 x = 14
x = 2
Finally, substituting this value of 𝑥 into the expression for y gives y = 2(2) − 1 = 3

Therefore, the unique solution of the system is given by x = 2 and y = 3. Geometrically, the two lines
represented by the two equations that make up the system intersect at the point (2,3).

Example: A system of linear equations which are coincident has infinitely many solutions:

Consider the system 2 x − y = 1 ; 6 x − 3 y = 3

Solving the first equation for y in terms of x , we obtain the equation


y = 2x − 1
Substituting this expression for y into the second equation yields
6 x − 3(2 x − 1) = 3
 6x − 6x + 3 = 3
0 = 0
Which is a true statement. This result follows from the fact that the second equation is equivalent to
the first. Our computations have revealed that the system of two equations is equivalent to the single

4
Matrices, Vectors, Fourier Analysis Spring 2020-2021

equation 2 x − y = 1 . Thus, any ordered pair of numbers ( x, y) satisfying the equations 2 x − y = 1 or


y = 2 x − 1 constitutes a solution to the system.

In particular, by assigning the value t to x , where t is any real number, we find that y = 2t − 1 and so
the ordered pair (t , 2t − 1) is a solution of the system. The variable t is called a parameter. For example,
setting t = 0 gives the point (0,−1) as a solution of the system, and setting t = 1 gives the point (1, 1) as
another solution. Since t represents any real number, there are infinitely many solutions of the system.
Geometrically, the two equations in the system represent the same line, and all solutions of the system
are points lying on the line (Figure). Such a system is said be dependent.

Example: A system of linear equations that has no solution:


Consider the system
2x − y = 1
6 x − 3 y = 12
Solving the first equation for y in terms of x , we obtain the equation
y = 2x − 1
Substituting this expression for y into the second equation yields
6 x − 3(2 x − 1) = 12
 6 x − 6 x + 3 = 12 0 = 9
which is clearly untrue. Thus, there is no solution to the system of equations. To interpret this situation
geometrically, cast both equations in the slope-intercept form, obtaining
y = 2x −1
y = 2x − 4

We see at once that the lines represented by these equations are parallel (each has slope 2) and
distinct since the first has y intercept −1 and the second has 𝑦 intercept −4. Systems having no
solutions such as this one are said to be inconsistent.

Homogeneous and nonhomogeneous linear equation:

5
Matrices, Vectors, Fourier Analysis Spring 2020-2021

A system of linear equations is called homogeneous if all the constant terms b1, b2 ....,bn of the Non-
homogeneous system are zero such as the system has the form:
a11x1 + a12 x2 + . . . + a1n xn = 0
a21x1 + a22 x2 + . . . + a2 n xn = 0
. . . . . .
. . . . . .
. . . . . .
am1 x1 + am 2 x2 + . . . + amnxn = 0
Every homogeneous system of linear equations called consistent. Since
x1 = 0, x2 = 0,.................,xn = 0 is always a solution of the system. This solution is called the
trivial solution. If the other solution exists, they are called the non-trivial solution.

Matrices and system of linear equations:


The linear equations in equation (i) is equivalent to the matrix equation.
 a11 a12 . . . a1n   x1   b1 
a    
 21 a22 . . . a2 n   x2   b2 
 . . . . . .   x3   b3 
   =  
 . . . . . .  .   . 
 . . . . . .  .   . 
    
am1 an 2 . . . am n   xm  bm 
or simply 𝐴 𝑋 = 𝐵 …………………………………….…(2)
where A = (a i j ) , X = ( x i ) and B = (b i )

That is every solution of the system (1) is a solution of the matrix equation (2) and vice versa. Observe
that the associated homogeneous system of (1) is then equivalent to the matrix equation 𝐴𝑋 = 0.
The above matrix A is called the co-efficient matrix of the system (1) and the matrix
 a11 a12 . . . a1n b1 
 
 a21 a22 . . . a2n b2 
 . . . . . . . 
 
 . . . . . . . 
 . . . . . . . 
 
am1 an 2 . . . amn bm 
is called the augmented matrix of (1). Observe that the system (1) is completely determined by its
augmented matrix.

There are three commonly used methods to solve system of linear equations:
1. Using inverse matrix,
2. Using elementary row operations (Gaussian elimination and Gauss-Jordan elimination),
3. Cramer’s rule.

6
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Example:
The co-efficient matrix and the augmented matrix of the system
2x + 3y − 4z = 7
x − 2 y − 5z = 3
are respectively the following matrices:
 2 3 − 4 2 3 −4 7
  and  
1 − 2 − 5  − −2 −5 3 
observe that the system is equivalent to the matrix equation.
 x
 2 3 − 4    7 
  y  =   .
 1 − 2 − 5  z   3 
 
Solution of linear equation by applying matrices:

When the linear system has n linear equations with n unknowns,


Consider the linear system in equation (2) in which 𝑚 = 𝑛
Let, 𝐷 be the determinant of the matrix 𝐴. we have to evaluate the determinant. If 𝐷 = 0, 𝐴 is
singular. So A −1 does not exist and hence the system has no solution. If D  0 , A is nonsingular.
So, A −1 exists and hence the system has a solution. Now multiplying both sides of (3) by A −1 ,
we have
A−1 AX = A−1 B −1

 IX = A B−1 since A A = I
IX =X
−1 1−1
 X = A B (A  )
A
That is,
 x1   l1   m 
   A11 A12 . . A1n     
.
1

  A  
 x2   21 A22 . . A2 n  l 2  m2 
.
 
  1  . . . . .    
.
x  =     = m (say)
 3 A  . . . . .  l 3   3 
.
 . 
.  . . . . .  .  
.
      . 
.  An1 An 2 . . Ann   .   
.
 x n  l n  mn 
Then, x1 = m1 , x2 = m2 , x3 = m3 ,..............xn = mn (say) is a solution of the given system of n linear
equations.
It is to be noted that the solution of the system of equation can also be found by reducing the augmented
matrix of the given system to reduced echelon form.

When the system has 𝒎 linear equation with 𝒏 unknown and 𝒎 < 𝒏.

Consider the following system of 𝑚 linear equations in n unknowns x1 , x2 ,...........xn

7
Matrices, Vectors, Fourier Analysis Spring 2020-2021

a11x1 + a12 x2 + . . . + a1n xn = b1 


a21x1 + a22 x2 + . . . + a2 n xn = b2 
. . . . . . 
....(4)
. . . . . . 
. . . . . . 

an1 x1 + an 2 x2 + . . . + ann xn = bn 
 i = 1,2,3,..., m
in which 𝑚 < 𝑛. Here, a i j and bi ;  are constants.
 j = 1,2,3,..., n
 a11 a12 . . . a1n   x1   b1 
a    
 21 a22 . . . a2 n   x2  b2 
 . . . . . .   x3  b3 
The given system (4) can be written in matrix form as:    =  
 . . . . . .  .   . 
 . . . . . .  .   . 
    
an1 an 2 . . . ann   xn  bn 
Now the augmented matrix of the system is
 a11 a12 . . . a1n b1 
 
 a21 a22 . . . a2 n b2 
 . . . . . . .
 .
 . . . . . . .
 . . . . . . .
 
am1 an 2 . . . am n bn 
We shall apply the elementary row transformations on the above augmented matrix to reduce it to the
reduced row echelon form. The reduced form of the augmented matrix will either give a solution of
the given system or will indicate that the system is inconsistent.

Example of the algorithm


Suppose the goal is to find and describe the set of solutions to the following system of linear equations:
2𝑥 + 𝑦 − 𝑧 = 8 (𝑟1 )
−3𝑥 − 𝑦 + 2𝑧 = −11 (𝑟2 )
−2𝑥 + 𝑦 + 2𝑧 = −3 (𝑟3 )

The table below is the row reduction process applied simultaneously to the system of equations, and
its associated augmented matrix. The row reduction procedure may be summarized as follows:
eliminate x from all equations below 𝑟1, and then eliminate y from all equations below 𝑟2 . This will
put the system into triangular form. Then, using back-substitution, each unknown can be solved.

System of equations row operations augmented matrix


2𝑥 + 𝑦 − 𝑧 = 8 2 1 −1 8
−3𝑥 − 𝑦 + 2𝑧 = −11 [ −3 −1 2 | −11]
−2𝑥 + 𝑦 + 2𝑧 = −3 −2 1 2 −3
2𝑥 + 𝑦 − 𝑧 = 8 𝑟2 → 2𝑟2 + 3𝑟1 2 1 −1 8
𝑦+𝑧 =2 𝑟3 → 𝑟3 + 𝑟1 [ 0 1 1 | 2]
2𝑦 + 𝑧 = 5 0 2 1 5

8
Matrices, Vectors, Fourier Analysis Spring 2020-2021

2𝑥 + 𝑦 − 𝑧 = 8 𝑟3 → 𝑟3 − 2𝑟2 2 1 −1 8
𝑦+𝑧 =2 [ 0 1 1 | 2]
−𝑧 = 1 0 0 −1 1
The matrix is now in echelon form
2𝑥 + 𝑦 =7 𝑟1 → 𝑟1 − 𝑟3 2 1 0 7
𝑦 =3 𝑟2 → 𝑟2 + 𝑟3 [ 0 1 0 | 3]
−𝑧 = 1 0 0 −1 1
2𝑥 =4 𝑟1 → 𝑟1 − 𝑟2 2 0 0 4
𝑦 =3 [ 0 1 0 | 3]
−𝑧 = 1 0 0 −1 1
𝑥 =2 1 1 0 0 2
𝑟1 → 𝑟 [ 0 1 0| 3 ]
𝑦 =3 2 1
𝑧 = −1 𝑟2 → −𝑟2 0 0 1 −1

The solution is 𝑧 = −1, 𝑦 = 3, and 𝑥 = 2. So, there is a unique solution to the original system of
equations.

Example: Solve the following system of equations using Gaussian elimination method
2𝑥 + 𝑦 + 3𝑧 = 1 (𝑟1 )
2𝑥 + 6𝑦 + 8𝑧 = 3 (𝑟2 )
6𝑥 + 8𝑦 + 18𝑧 = 5 (𝑟3 )

𝑟2 → 𝑟2 − 𝑟1 2𝑥 + 𝑦 + 3𝑧 = 1
𝑟3 → 𝑟3 − 3𝑟1 5𝑦 + 5𝑧 = 2
5𝑦 + 9𝑧 = 2
𝑟3 → 𝑟3 − 𝑟2 2𝑥 + 𝑦 + 3𝑧 = 1
5𝑦 + 5𝑧 = 2
4𝑧 = 0
From this stage, we can get the solution by 𝑧=0
back solving 5𝑦 + 5(0) = 2
2
⇒𝑦=
5
2 3
and 2𝑥 + 5 + 3(0) = 1 ⇒ 𝑥 = 10

So the solution is: 3 2


(𝑥, 𝑦, 𝑧) = ( , , 0)
10 5
Example: Solve the following system of equations using elementary row operations
3𝑥 + 𝑦 − 6𝑧 = −10 (𝑟1 )
2𝑥 + 𝑦 − 5𝑧 = −8 (𝑟2 )
6𝑥 − 3𝑦 + 3𝑧 = 0 (𝑟3 )

𝑟2 → 3𝑟2 − 2𝑟1 3𝑥 + 𝑦 − 6𝑧 = −1 0
𝑟3 → 𝑟3 − 2𝑟1 𝑦 − 3𝑧 = −4
𝑦 − 3𝑧 = −4
𝑟3 → 𝑟3 − 𝑟2 3𝑥 + 𝑦 − 6𝑧 = −1 0
𝑦 − 3𝑧 = −4

9
Matrices, Vectors, Fourier Analysis Spring 2020-2021

0=0

Thinking back to the two-variable case, getting a line like "0 = 0" (which is true, but unhelpful)
means that this is a dependent system, and the solution is going to have variables in it. The answer
above means that the solution is a line in three-dimensional space rather than a single point. To find
the solution, we have to solve the two remaining equations for 𝑥 and 𝑦 in terms of 𝑧:
𝑦 = 3𝑧 − 4
∴ 𝑥 + 3𝑧 − 4 − 6𝑧 = −10
⇒𝑥 =𝑧−2
Let, 𝑧 = 𝑡, where 𝑡 is a free variable. So the solution of the system is (𝑥, 𝑦, 𝑧) = (𝑡 − 2, 3𝑡 − 4, 𝑡)

Example: Solve the following system of equations using Gaussian elimination method
𝑥 +𝑧=1 (𝑟1 )
𝑥+𝑦+𝑧 =2 (𝑟2 )
𝑥−𝑦+𝑧 =1 (𝑟3 )

𝑟2 → 𝑟2 − 𝑟1 𝑥 +𝑧=1
𝑟3 → 𝑟3 − 𝑟1 𝑦 =1
−𝑦 =0
𝑟3 → 𝑟3 + 𝑟2 𝑥 +𝑧=1
𝑦 =1
0 =1
The third row ′0 = 1′ is nonsense. So, the system is inconsistent. That means there is no solution.

Example: Solve the following system using Gauss-Jordan elimination method.


2𝑥 − 𝑦 + 𝑧 = 1
𝑥 + 4𝑦 − 3𝑧 = −2
3𝑥 + 2𝑦 − 𝑧 = 0
Solution
2 −1 1 1 ~ 1 4 −3 −2 𝑟2 → 𝑟2 − 2𝑟1 1 4 −3 −2
[1 4 −3 ⋮ −2] 𝑟 ↔ 𝑟 [2 −1 1 ⋮ 1 ] ~ [0 −9 7 ⋮ 5]
1 2
3 2 −1 0 3 2 −1 0 𝑟3 → 𝑟3 − 3𝑟1 0 −10 8 6

~ 1 4 −3 −2 ~ 1 4 −3 −2
𝑟2 → 𝑟2 − 𝑟3 [ 0 1 −1 ⋮ −1] 𝑟 → 𝑟 + 10𝑟 [0 1 −1 ⋮ −1]
3 3 2
0 −10 8 6 0 0 −2 −4
1 4 −3 −2 1 0 1 2 ~ 1 0 0 0
~ ~
1
𝑟3 → −2𝑟3 [ 0 1 −1 ⋮ −1 ] [
𝑟1 → 𝑟1 − 4𝑟2 0 1 −1 ⋮ −1] 𝑟1 → 𝑟1 − 𝑟3 [0 1 0 ⋮ 1]
0 0 1 2 0 0 1 2 𝑟2 → 𝑟2 + 𝑟3 0 0 1 2
Hence the solution is 𝑥 = 0, 𝑦 = 1, 𝑧 = 2.

Example: Solve the following system of equations using matrix inversion and justify your answer.
2𝑥 + 𝑦 = 1 (𝑟1 )
𝑥 − 2𝑦 = 3. (𝑟2 )

10
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Solution:

We know 𝐴𝑋 = 𝐵
If 𝐴−1 exists, then
𝐴−1 (𝐴𝑋) = 𝐴−1 𝐵
𝐼𝑋 = 𝐴−1 𝐵
𝑋 = 𝐴−1 𝐵
The given linear equations can be written in matrix form as
2 1 𝑥 1
[ ][ ] = [ ]
1 −2 𝑦 3
2 1 𝑥 1
Suppose, 𝐴 = [ ], 𝑋 = [𝑦], and 𝐵 = [ ]
1 −2 3
2 1
The determinant of the matrix A is | | = −6 ≠ 0
1 −2
So, the matrix 𝐴 is non-singular and 𝐴−1 exists.
1 −2 −1
Now 𝐴−1 = −5 [ ]
−1 2
−1
And 𝑋 = 𝐴 𝐵
1 −2 −1 1
= [ ][ ]
−5 −1 2 3
1 −5
= [ ]
−5 5
1
=[ ]
−1
𝑥 1
∴ [𝑦 ] = [ ]
−1
∴ 𝑥 = 1 and 𝑦 = −1
𝑟1 : 𝐿. 𝐻. 𝑆 = 2𝑥 + 𝑦 = 2.1 − 1 = 1 = 𝑅. 𝐻. 𝑆
𝑟1 : 𝐿. 𝐻. 𝑆 = 𝑥 − 2𝑦 = 1 − 2(−1) = 3 = 𝑅. 𝐻. 𝑆

Example: Solve the following system of equations using matrix inversion.


2𝑥 − 𝑦 + 3𝑧 = 53
4𝑥 − 𝑧 = −53
3𝑥 + 3𝑦 + 2𝑧 = 106

Solution: We write down the given system as


 2 − 1 3  x   53 
    
 4 0 − 1 y  =  − 53 
 3 3 2  z   106 
    
 𝐴𝑋 =𝐵 [ say]
 𝑋=𝐴 𝐵 –1
[ since 𝐴–1 exists]
 x  3 11 1   53   − 6 
  1     
  y =  − 11 − 5 14   − 53  =  22  [ after finding 𝐴–1]
 z  53  12 − 9 4   106   29 
       
 𝑥 =– 6, 𝑦 = 22, 𝑧 = 29 is the required solution.

Example: Using matrix inversion solve the system of linear equations

11
Matrices, Vectors, Fourier Analysis Spring 2020-2021

𝑥1 + 2𝑥2 + 3𝑥3 = 5
2𝑥1 + 5𝑥2 + 3𝑥3 = 3 .
𝑥1 + 8𝑥3 = 17

Solution:
1 2 3
The system of equations can be written in the matrix form as 𝐴𝑋 = 𝐵 , where 𝐴 = [2 5 3],
1 0 8
𝑥1 5
𝑋 = [𝑥2 ] and 𝐵 = [ 3 ] . The solution can be written as 𝑋 = 𝐴−1 𝐵. Let us find 𝐴−1 using
𝑥3 17
elementary row operations.
1 2 3 1 0 0 ~ 1 2 3 1 0 0 ~
[𝐴 ⋮ 𝐼] = [2 5 3 ⋮ 0 1 0] 𝑟2 → 𝑟2 − 2𝑟1 [0 1 −3 ⋮ −2 1 0] 𝑟 → 𝑟 + 2𝑟
3 3 2
1 0 8 0 0 1 𝑟3 → 𝑟3 − 𝑟1 0 −2 5 −1 0 1

1 2 3 1 0 0 ~ 1 0 9 5 −2 0 ~
[0 1 −3 ⋮ −2 1 0] 𝑟1 → 𝑟1 − 2𝑟2 [0 1 −3 ⋮ −2 1 0] 𝑟 → 𝑟 + 9𝑟
1 1 3
0 0 −1 −5 2 1 0 0 −1 −5 2 1

1 0 0 −40 16 9 ~ 1 0 0 −40 16 9
[0 1 −3 ⋮ −2 1 0] 𝑟2 → 𝑟2 − 3𝑟3 [0 1 0 ⋮ 13 −5 −3]
0 0 −1 −5 2 1 𝑟3 → −𝑟3 0 0 1 5 −2 −1

−40 16 9
∴ 𝐴−1 = [ 13 −5 −3]
5 −2 −1

−40 16 9 5 1
−1
Now, 𝑋 = 𝐴 𝐵 = [ 13 −5 −3] [ 3 ] = [−1] 𝑥1 = 1, 𝑥2 = −1 and 𝑥3 = 2.
5 −2 −1 17 2

Cramer’s Rule:
Let a system of linear equations is given 𝐴𝑋 = 𝐵 and |𝐴| = 𝐷. This system is
(a) inconsistent if 𝐵 ≠ 0 but 𝐷 = 0 ;
(b) consistent and redundant if 𝐵 = 0 and 𝐷 = 0 ;
(c) consistent and unique if 𝐷 ≠ 0; and in this case the solution is given by
D
xi = i (i = 1, 2, ......., n) ,
D
𝐷𝑖 can be obtained by replacing ith column by right hand side.
Explicit formulas for small systems
𝑎 𝑥 + 𝑏1 𝑦 = 𝑐1
Consider the linear system { 1
𝑎2 𝑥 + 𝑏2 𝑦 = 𝑐2
𝑎 𝑏1 𝑥 𝑐1
which in matrix format is [ 1 ] [𝑦] = [𝑐 ]
𝑎2 𝑏2 2

Assume 𝑎1 𝑏2 − 𝑏1 𝑎2 nonzero. Then, with help of determinants 𝑥 and 𝑦 can be found with Cramer's
rule as

12
Matrices, Vectors, Fourier Analysis Spring 2020-2021

𝑐 𝑏1 𝑎1 𝑐1
| 1 | 𝑐 𝑏 −𝑏 𝑐 |𝑎
𝑐2 𝑏2 1 2 1 2 2 𝑐 | 𝑎1 𝑐 2 − 𝑐1 𝑎2
𝑥= = and 𝑦 = = .
𝑎1 𝑏1 𝑎1 𝑏2 − 𝑏1 𝑎2 𝑎 𝑏1 𝑎1 𝑏2 − 𝑏1 𝑎2
| | | 1 |
𝑎2 𝑏2 𝑎2 𝑏2

The rules for 3  ×  3 matrices are similar. Given


𝑎1 𝑥 + 𝑏1 𝑦 + 𝑐1 𝑧 = 𝑑1
{𝑎2 𝑥 + 𝑏2 𝑦 + 𝑐2 𝑧 = 𝑑2
𝑎3 𝑥 + 𝑏3 𝑦 + 𝑐3 𝑧 = 𝑑3

which in matrix format is


𝑎1 𝑏1 𝑐1 𝑥 𝑑1
[𝑎 2 𝑏2 𝑐2 ] [𝑦] = [𝑑2 ]
𝑎3 𝑏3 𝑐3 𝑧 𝑑3

Then the values of 𝑥, 𝑦 and 𝑧 can be found as follows:


𝑑1 𝑏1 𝑐1 𝑎1 𝑑1 𝑐1 𝑎1 𝑏1 𝑑1
[𝑑2 𝑏2 𝑐2 ] [𝑎2 𝑑2 𝑐2 ] [𝑎2 𝑏2 𝑑2 ]
𝑑 𝑏3 𝑐3 𝑎 𝑑3 𝑐3 𝑎 𝑏3 𝑑3
𝑥= 3 ,𝑦 = 3 and 𝑧 = 3
𝑎1 𝑏1 𝑐1 𝑎1 𝑏1 𝑐1 𝑎1 𝑏1 𝑐1
[𝑎 2 𝑏2 𝑐2 ] [𝑎2 𝑏2 𝑐2 ] [𝑎2 𝑏2 𝑐2 ]
𝑎3 𝑏3 𝑐3 𝑎3 𝑏3 𝑐3 𝑎3 𝑏3 𝑐3

Similar idea can be extended for 𝑛 × 𝑛 systems

Example:
Let us demonstrate Cramer's rule with the following system:
𝑥 + 2𝑦 + 3𝑧 = 1
−𝑥 + 2𝑧 = 2
−2𝑦 + 𝑧 = −2
Step 1:
1 2 3
The coefficient matrix of this system is 𝐴 = [−1 0 2]
0 −2 1
Note that the matrix is square (it has 3 rows and 3 columns), and so we may proceed with the
next step of Cramer's rule.
Step 2:
Now find the determinant of the coefficient matrix 𝐴; use the matrix manipulator in the tools box
if you would like help in this computation. You should get |𝐴| = 12. This is not zero, so Cramer's
rule may be applied here.
Step 3:
1 2 3 |𝐴 | 20 5
𝐴𝑥 = [ 2 0 2] and its determinant is |𝐴𝑥 | = −20. Therefore 𝑥 = |𝐴|𝑥 = − 12 = − 4
−2 −2 1
Step 4:
Using the same method, the values for the remaining 2 variables, 𝑥 and 𝑦, are computed below:

13
Matrices, Vectors, Fourier Analysis Spring 2020-2021

1 1 3 |𝐴𝑦 | 13
𝐴𝑦 = [−1 2 2] and its determinant is |𝐴𝑦 | = 13. Therefore 𝑦 = |𝐴| = − 12
0 −2 1
1 2 1 |𝐴 | 2 1
𝐴𝑧 = [−1 0 2 ] and its determinant is |𝐴𝑧 | = 2. Therefore 𝑧 = |𝐴|𝑧 = 12 = 6
0 −2 −2

Example: Verify whether the following system of linear equations is consistent or not. If consistent
then solve the system using Cramer’s rule. Also check your answer.
2𝑥 − 3𝑦 − 5𝑧 = 40
17𝑥 + 14𝑦 − 22 𝑧 = 22
15𝑥 + 17𝑦 − 17𝑧 = −18 .

Solution:
2 −3 −5
D = 17 14 − 22 = 0 and ≠ 𝟎 . Therefore, this SLE is inconsistent
15 17 − 17

Example:
2𝑥 − 5𝑦 + 6𝑧 = −27
10𝑥 − 11𝑦 − 9𝑧 = 0
−3𝑥 + 2𝑧 = 16
Solution:
2 −5 6
𝐷 = 10 − 11 − 9 = – 277 and 𝐵 ≠ 0 and, therefore, this SLE has a unique solution.
−3 0 2
− 27 − 5 6 2 − 27 6 2 −5 − 27
Now D1 = 0 − 11 − 9 ; D2 = 10 0 − 9 ; D3 = 10 − 11 0 .
16 0 2 − 3 16 2 −3 0 16
= 2370 ; = 1059 ; = 1339.
2370 1059 1339
Thus 𝑥 = − ; 𝑦 =– ; 𝑧 =– .
277 277 277

Example:
3𝑥– 2𝑦 + 5𝑧– 6𝑡 = 0
– 2𝑥– 9𝑦– 𝑧 + 7𝑡 = 0
5𝑥 + 7𝑦– 4𝑧 – 6𝑡 = 0
8𝑦– 9𝑧– 2𝑡 = 0.
Solution:
3 −2 5 −6
− 2 − 9 −1 7
∆= = – 1461 and 𝐵 = 𝟎. Consequently (0,0,0,0) is the solution.
5 7 −4 −6
0 8 −9 −2

14
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Example:
Solve the following system of linear equations using Cramer’s rule
2𝑥 + 𝑦 + 𝑧 = 3
𝑥−𝑦−𝑧 =0
𝑥 + 2𝑦 + 𝑧 = 0
We have the left-hand side of the system with the variables (the "coefficient matrix") and the right-
hand side with the answer values. Let 𝐷 be the determinant of the coefficient matrix of the above
system, and let 𝐷𝑥 be the determinant formed by replacing the 𝑥-column values with the answer-
column values: Evaluating each determinant, we get:
2 1 1
𝐷 = |1 −1 −1| = 3
1 2 1
3 1 1 2 3 1 2 1 3
𝐷𝑥 = |0 −1 −1| = 3, 𝐷𝑦 = |1 0 −1| = −6, 𝐷𝑧 = |1 −1 0| = 9
0 2 1 1 0 1 1 2 0

So, according to Cramer's rule:


𝐷𝑥 3 𝐷𝑦 −6 𝐷𝑧 9
𝑥= = = 1, 𝑦 = = = −2 and 𝑧 = = =3
𝐷 3 𝐷 3 𝐷 3

Example:
Solve the following system of linear equations using Crammer’s rule
2𝑥 + 3𝑦 + 𝑧 = 10
𝑥−𝑦+𝑧 =4
4𝑥 − 𝑦 − 5𝑧 = −8 .

Solution: Each unknown will be the quotient of the determinant obtained by substituting the answers
in the right sides of the equations for the coefficients of the unknown divided by the determinant
formed by taking the coefficients on the left sides of the equations.

10 3 1 2 10 1 2 3 10
|4 −1 1 | |1 4 1| |1 −1 4|
−8 −1 −5 84 4 −8 −5 42 4 −1 −8 126
𝑥= 2 3 1 = = 2, 𝑦 = 2 3 1 = = 1, 𝑧 = 2 3 1 = =3
42 42 42
|1 −1 1 | |1 −1 1| |1 −1 1|
4 −1 −5 4 −1 −5 4 −1 −5

Example:
Determine the value(s) of  and  such that the following system of linear equations has (i) no
solution, (ii) more than one solution, and (iii) a unique solution.
 x+ y+z =6

 x + 2 y + 3z = 10
 x + 2 y + z = 

Solution: The corresponding augmented matrix is


1 1 1 6 ~ 1 1 6 6
(1 2 3 |10) 𝑟2 → 𝑟2 − 𝑟1 (0 1 2 | 4 )
1 2   𝑟3 → 𝑟3 − 𝑟2 0 0 𝜆 − 1 𝜇 − 10

15
Matrices, Vectors, Fourier Analysis Spring 2020-2021

The above system is in echelon form. Now we consider the following three cases:
(i) If  = 3 and   10 then third equation of (1) is of the form 0 = a , where a =  − 10  0
which is not true. So, the system is inconsistent. Thus, the system has no solution for  = 3
and   10 .
(ii) If  = 3 and  = 10 then third equation of (1) is vanishes and the system will be in echelon
form having two equations in three variables. So, it has 3 − 2 = 1 free variables which is
𝑧. Hence the given system has more than one solution for  = 3 and  = 10 .
(iii) For a unique solution, the coefficient of 𝑧 in the 3rd equation must be non-zero i.e.,   3
and  may have any value. Therefore, the given system has unique solution for   3 and
arbitrary values of  .

Example:
Determine the values of  and  such that the following system of linear equations has (𝑖) no solution
(𝑖𝑖) more than one solution and (𝑖𝑖𝑖) a unique solution.
 x + y − z =1

2 x + 3 y +  z = 3 .
 x + y + 3 z = 2

 x + y − z =1

Solution: The given system of liner equations is 2 x + 3 y + z = 3
 x + y + 3 z = 2

Reduce the system to echelon form by means of elementary row operations,
 x + y − z =1
  L/2 = L2 − 2 L1 
 y + ( + 2) z = 1  / 
 ( − 1) y + 4 z = 1  L3 = L3 − L1 

 x + y − z =1

 y + ( + 2) z = 1 L
/
3 = L3 − ( − 1) L2 
4 − ( − 1)( + 2)z = 2 − 

 x + y − z =1

 y + ( + 2) z = 1
( )
 6 −  − 2 z = 2 − 

 x + y − z =1

 y + ( + 2) z = 1  (1)
( + 3)(2 −  ) z = 2 − 

The above system is in echelon form. Now we consider the following three cases:
(i) From third equation of (1) , we see that if  + 3 = 0 or  = −3 then the equation becomes
0 = 5 , which is contradiction. Therefore, the system is inconsistent if  = −3 . Thus, the
system has no solution for  = −3 .
(ii) We know, if the number of variables is greater than the number of equations, then the
system has more than one solution. From third equation of (1) , we see that if  = 2 then it

16
Matrices, Vectors, Fourier Analysis Spring 2020-2021

becomes 0 = 0 . In this case the system has three variables with two equations. So, the
given system has more than one solution for  = 2 .
(iii) We know, if the number of variables and the number of equations be equal, then the system
has unique solution. The system (1) has a unique solution
( + 3)(2 −  )  0    −3,   2.

Example:
Determine the values of  and  such that the following system of linear equations has (i) no
solution, (ii) more than one solution, and (iii) a unique solution.
 2x + 3 y + z = 5

 3 x − y + z = 2
x + 7 y − 6z = 

Solution: The given system of liner equations is


 2x + 3 y + z = 5

 3 x − y + z = 2
x + 7 y − 6z = 

Reduce the system to echelon form by means of elementary operations,
 2x + 3 y + z = 5
  L/2 = 2 L2 − 3L1 
 − 11 y + (2 − 3) z = −11  / 
  L3 = 2 L3 − L1 

 11 y − 13 z = 2 − 5
 2x + 3 y + z = 5

 − 11 y + (2 − 3) z = −11  
L/3 = L3 + L2  (1)
 2( − 8) z = 2(  − 8)

The above system is in echelon form. Now we consider the following three cases:
(i) For a unique solution, the coefficient of 𝑧 in the 3rd equation of (1) must be non-zero i.e.,
  8 and  may have many values. Therefore, the given system has unique solution for
  8 and arbitrary values of  .
(ii) If  = 8 and  = 8 then third equation of (1) is vanishes and the system will be in echelon
form having two equations in three variables. So, it has 3 − 2 = 1 free variables which is
𝑧. Hence the given system has more than one solution for  = 8 and  = 8. .
(iii) If  = 8 and   8 then third equation of (1) is of the form 0 = a , where a =  − 8  0
which is not true. So, the system is inconsistent. Thus, the system has no solution for  = 8
and   8 .

Example:
Find the values of 𝑘 such that the following system of linear equations has non-zero solution.
𝑥 + 𝑘𝑦 + 3𝑧 = 0
4𝑥 + 3𝑦 + 𝑘𝑧 = 0.
2𝑥 + 𝑦 + 2𝑧 = 0

17
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Solution:
The augmented matrix 𝐶 = [𝐴: 𝐵]
1 𝑘 3 : 0
~ [4 3 𝑘 : 0]
2 1 2 : 0
On interchanging first row and third row, we have
2 1 2 : 0
~ [4 3 𝑘 : 0]
1 𝑘 3 : 0
Reducing the system to row echelon form by the elementary row operations …
2 1 2 : 0
𝑅2′ = 𝑅2 − 2𝑅1
~[ 0 1 𝑘 − 4 : 0] [ ′ 1 ]
0 𝑘−2
1
2 : 0 𝑅 3 = 𝑅 3 − 𝑅1
2

2 1 2 : 0
1
~ [0 1 𝑘−4 : 0] [𝑅3′ = 𝑅3 − (𝑘 − 2)𝑅2 ]
1
0 0 2 − (𝑘 − 2) (𝑘 − 4) : 0
So,
1
2 − (𝑘 − ) (𝑘 − 4) = 0
2
2
9
⟹ −𝑘 + 𝑘 = 0
2
9
⟹ 𝑘(−𝑘 + ) = 0
2
9
∴ 𝑘 = 0,
2

Example: A medicine company wishes to produce three types of medicine : type 𝑃, 𝑄 and 𝑅. To
manufacture a type 𝑃 medicine requires 2 minutes each on machine 𝐼 and 𝐼𝐼 and 3 minutes on machine
𝐼𝐼𝐼. A type of 𝑄 medicine requires 2 minutes on machine 𝐼, 3 minutes on machine 𝐼𝐼 and 4 minutes of
machine 𝐼𝐼𝐼. A type 𝑅 medicine requires 3 minutes on machine 𝐼, 4 minutes on machine 𝐼𝐼 and 3
minutes on machine 𝐼𝐼𝐼. There are 3.5 hours available on machine 1, 4.5 hours available on machine 𝐼𝐼
and 5 hours available on machine 𝐼𝐼𝐼. How many medicine of each type should company make in
order to use all the available time?

Solution:
Here, 3.5 hours = 210 minutes, 4.5 hours = 270 minutes and 5 hours = 300 minutes.
Let 𝑥, 𝑦 and 𝑧 be the number of medicines of types 𝑃, 𝑄 and 𝑅 respectively. Then we have the
2𝑥 + 2𝑦 + 3𝑧 = 210
following system of linear equations: {2𝑥 + 3𝑦 + 4𝑧 = 270
3𝑥 + 4𝑦 + 3𝑧 = 300
The augmented matrix of the above system is
2 2 3 : 210
[2 3 4 : 270]
3 4 3 : 300
Reducing the system to echelon form by the elementary row operations

18
Matrices, Vectors, Fourier Analysis Spring 2020-2021

2 2 3 : 210 𝑟 ′ = 𝑟2 − 𝑟1
~ [0 1 1 : 60 ] [ ′ 2 ]
𝑟3 = 2𝑟3 − 3𝑟 1
0 2 −3 : −30
2 2 3 : 210
~ [0 1 1 : 60 ] [𝑟3′ = 𝑟3 − 2𝑟1 ]
0 0 −5 : −150
Hence the solution of the above system is 𝑥 = 30, 𝑦 = 30, 𝑧 = 30
Thus, the number of each type of medicine is 30.

Example: Determine the polynomial 𝑝(𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 whose graph passes through the
points (1,4) , (2,0) and (3,12).

Solution:
Given polynomial 𝑝(𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2
Substituting x = 1, 2 and 3 into p(x) and the corresponding y − values produces the system of linear
equations in the variables a0 , a1 and a 2 shown below:
 p(1) = a0 + a1 (1) + a 2 (1) 2 = a0 + a1 + a 2 = 4

 p(2) = a0 + a1 (2) + a 2 (2) = a0 + 2a1 + 4a 2 = 0
2

 p(3) = a + a (3) + a (3) 2 = a + 3a + 9a = 12


 0 1 2 0 1 2

Reducing this system to echelon form by the elementary operations,


a0 + a1 + a 2 = 4
  L2 / = L2 − L1 
 a1 + 3a 2 = −4  / 
 a + 5a = 12  L3 = L3 − L2 
 1 2

a0 + a1 + a 2 = 4

 a1 + 3a 2 = −4 
L3 = L3 − L2
/

 2a = 16
 2

By back substitution method from 3rd equation, we have a2 = 8


From the 2nd equation, we get a1 + 24 = −4 a1 = −28
and from 1st equation, we get a0 − 28 + 8 = 4  a0 = 24
Hence, the solution of this system is a0 = 24 , a1 = −28 and a2 = 8 .
So, the polynomial function is p( x) = 24 − 28 x + 8 x 2
The graph p is shown in the following figure:

19
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Example: Find the polynomial that fits the points (−2, 3), (−1, 5), (0, 1), (1, 4) and (2, 10).

Solution: We have provided five points, so we chose a fourth-degree polynomial function


𝑝(𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + 𝑎3 𝑥 3 + 𝑎4 𝑥 4 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ (1)
Substitution the given points into 𝑝(𝑥) products the system of linear equations listed below:
𝑎0 − 2𝑎1 + 4𝑎2 − 8𝑎3 + 16𝑎4 = 3
𝑎0 − 𝑎1 + 𝑎2 − 𝑎3 + 𝑎4 = 5
𝑎0 =1
𝑎0 + 𝑎1 + 𝑎2 + 𝑎3 + 𝑎4 = 4
𝑎0 + 2𝑎1 + 4𝑎2 + 8𝑎3 + 16𝑎4 = 10
The solution of the above system is
5 101 18 17
𝑎0 = 1, 𝑎1 = − 24 , 𝑎2 = 24 , 𝑎3 = 24 , 𝑎4 = − 24
Which means the polynomial function is
5 101 2 18 3 17 4 1
𝑝(𝑥) = 1 − 𝑥 + 𝑥 + 𝑥 − 𝑥 = (24 − 5𝑥 + 101𝑥 2 + 18𝑥 3 − 17𝑥 4 )
24 24 24 24 24
The graph of 𝑝(𝑥) is shown in the following figure:

Example:
Set up a system of linear equations to represent the network shown in the following figure and solve
the system.

20
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Solution:
Each of the network’s five junctions gives rise to a linear equation, as shown below:
𝑥1 + 𝑥2 = 20 junction 1
𝑥3 + 20 = 𝑥4 junction 2
𝑥2 + 𝑥3 = 10 + 10 junction 3
𝑥1 + 10 = 𝑥5 junction 4
𝑥5 + 10 = 𝑥4 junction 5
The augmented matrix is
1 1 0 0 0 : 20 
0 0 1 − 1 0 : − 20 
 
0 1 1 0 0 : 20 
 
1 0 0 0 − 1 : − 10 
0 0 0 − 1 1 : − 10 
Reduce the system to echelon form by the elementary row operations
1 1 0 0 0 : 20 
0 1 1 0 0 : 20 
   R  R3 
0 0 1 − 1 0 : − 20  2 
   R4  R5 
0 0 0 − 1 1 : − 10 
1 0 0 0 − 1 : − 10 

1 1 0 0 0 : 20 
0 1 1 0 0 : 20 

0 0 1 −1 0 : − 20 R 5
/
= R5 − R1 
 
0 0 0 −1 1 : − 10 
0 − 1 0 0 −1 : − 30 

1 1 0 0 0 : 20 
0 1 1 0 0 : 20 

0 0 1 −1 0 : − 20 R
5
/
= R5 + R2 
 
0 0 0 −1 1 : − 10 
0 0 1 0 −1 : − 10 

21
Matrices, Vectors, Fourier Analysis Spring 2020-2021

1 1 0 0 0 : 20 
0 1 1 0 0 : 20 
  R4 / = (−1) R4 
0 0 1 −1 0 
: − 20  / 
   R5 = R5 − R3 
0 0 0 1 −1 : 10 
0 0 0 1 −1 : 10 

1 1 0 0 0 : 20 
0 1 1 0 0 : 20 
  R3 / = R3 + R4 
0 0 1 0 − 1 : − 10   / 
   R5 = R5 − R4 
0 0 0 1 − 1 : 10 
0 0 0 0 0 : 0 

1 1 0 0 0 : 20 
0 1 0 0 1 : 30 

0 0 1 0 − 1 : − 10  R 2
/
= R2 − R3 
 
0 0 0 1 − 1 : 10 
0 0 0 0 0 : 0 

1 0 0 0 − 1 : − 10 
0 1 0 0 1 : 30 

0 0 1 0 − 1 : − 10  R1
/
= R1 − R2 
 
0 0 0 1 − 1 : 10 
0 0 0 0 0 : 0 
The corresponding system of equations are as follows:
 x1 − x5 = − 10
 x2 x5 = 30

 x3 − x5 = − 10
 x 4 − x5 = 10


The above system is in echelon form having 4 equations in 5 unknowns. So, it has (5 − 4) = 1 free
variable, which is x5 .
Let x5 = t , then by back substitution method, we have
x4 = t + 10, x3 = t − 10, x2 = 30 − t , x1 = t − 10, where t is a real number.
So, this system has an infinite number of solutions.

Example:
Determine the currents I1 , I 2 and I 3 for the electrical network shown in the following figure.

22
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Solution:
Applying Kirchhoff’s current law to each junction produces
I 1 + I 3 = I 2 ; Junction 1 or junction 2
and applying Kirchhoff’s second law to two paths produces
R1 I 1 + R2 I 2 = 3I 1 + 2 I 2 = 7 path 1
R2 I 2 + R3 I 3 = 2 I 2 + 4 I 3 = 8 path 2
So, we have the following system of three linear equations in
the I1 , I 2 and I 3

 I1 − I2 + I3 = 0

3I 1 + 2 I 2 = 7
 2I 2 + 4I 3 = 8

The augmented matrix of the above system is
1 − 1 1 : 0
3 2 0 : 7 
 
0 2 4 : 8
Reducing the system to echelon form by the elementary row operations
1 − 1 1 : 0
0 5 − 3 : 7
  
R2 = R2 − 3R1
/

0 2 4 : 8
1 − 1 1 : 0 
0 5 − 3 : 7 
  R
3
/
= 5R3 − 2 R2 
0 0 26 : 26
1 − 1 1 : 0
0 5 − 3 : 7  / 1 
   R3 = 26 R3 
0 0 1 : 1
1 − 1 0 : − 1
0 5 0 : 10   R1 / = R1 − R3 
   / 
 R2 = R2 + 3R3 
0 0 1 : 1 
1 − 1 0 : − 1
0 1 0 : 2   / 1 
   R2 = 5 R2 
0 0 1 : 1 
1 0 0 : 1
0 1 0 : 2
  R1
/
= R1 + R2 
0 0 1 : 1
So, the solution of the above system is I1 = 1A, I 2 = 2 A and I 3 = 1A.

23
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Example:
Determine the currents I 1 , I 2 , I 3 , I 4 , I 5 and I 6 for the electrical network shown in the following figure.

Solution:
Applying Kirchhoff’s current law to each junction produces
I1 + I 3 = I 2 junction 1
I1 + I 4 = I 2 junction 2
I 3 + I 6 = I 5 junction 3
I 4 + I 6 = I 5 junction 4
and applying Kirchhoff’s second law to the three paths produces
2 I 1 + 4 I 2 = 10 path 1

 4I 2 + I 3 + 2I 4 + 2I 5 = 17 path 2
 2 I 5 + 4 I 6 = 14 path 3

Now we have the following system of seven linear equations in the variables I 1 , I 2 , I 3 , I 4 , I 5 and I 6

 I1 − I2 + I3 = 0
I − I2 + I4 = 0
 1
 I3 −I + I6 = 0

 I4 − I5 + I6 = 0
2 I + 4 I = 10
 1 2

 4I 2 + I 3 + 2I 4 + 2I 5 = 17
 2 I 5 + 4 I 6 = 14

Using Gauss-Jordan elimination method, we have solution of the above system is

24
Matrices, Vectors, Fourier Analysis Spring 2020-2021

I 1 = 1, I 2 = 2, I 3 = 1, I 4 = 1, I 5 = 3 and I 6 = 2
which means I1 = 1amp, I 2 = 2 amp and I 3 = 1amp. I 4 = 1amp, I 5 = 3 amp and I 6 = 2 amp.

Example:
Determine the loop currents I 1 and I 2 of the following circuit using mesh analysis.
Solution:
For loop 1: 10𝐼1 + 20𝐼1 − 20𝐼2 = 70
⇒ 30𝐼1 − 20𝐼2 = 70
⇒ 3𝐼1 − 2𝐼2 = 7

For loop 2: 20𝐼2 + 20𝐼2 − 20𝐼1 = −100


⇒ −20𝐼1 + 40𝐼2 = −100
⇒ 𝐼1 − 2𝐼2 = 5
Thus, the system of linear equations is
3𝐼1 − 2𝐼2 = 7
𝐼1 − 2𝐼2 = 5
Therefore, 𝐼1 = 1 𝐴 and 𝐼2 = −2𝐴

Example:
Determine the loop currents I 1 , I 2 and I 3 of the following circuit using mesh analysis.
Solution:
For loop 1: 10𝐼1 + 12𝐼1 − 10𝐼2 − 12𝐼3 = 24
⇒ 22𝐼1 − 10𝐼2 − 12𝐼3 = 24
⇒ 11𝐼1 − 5𝐼2 − 6𝐼3 = 12

For loop 2: 24𝐼2 + 10𝐼2 + 4𝐼2 − 10𝐼1 − 4𝐼3 = 0


⇒ −10𝐼1 + 38𝐼2 − 4𝐼3 = 0
⇒ 5𝐼1 − 19𝐼2 + 2𝐼3 = 0

For loop 3: 12𝐼3 − 12𝐼1 − 4𝐼2 = −6


⇒ 12𝐼1 + 4𝐼2 − 12𝐼3 = 6
⇒ 6𝐼1 + 2𝐼2 − 6𝐼3 = 3
Thus, the system of linear equation is
11𝐼1 − 5𝐼2 − 6𝐼3 = 12
5𝐼1 − 19𝐼2 + 2𝐼3 = 0
6𝐼1 + 2𝐼2 − 6𝐼3 = 3

Hence solving the system, 𝐼1 = 3.7 𝐴, 𝐼2 = 1.35 𝐴, 𝐼3 = 3.66 𝐴.


Example:
The following figure shows the flow of downtown traffic in a current city during the rush hours on a
typical weekday. The arrows indicate the direction of traffic flow on each-way road, and the average
number of vehicles per hour entering and leaving each intersection appears beside each road. 5th
Avenue and 6th Avenue can each handle up to 2000 vehicles per hour without causing congestion,
whereas the maximum capacity of both 4th street and 5th street is 1000 vehicles per hour. The flow of
traffic is controlled by traffic lights installed at each of the four intersections.

25
Matrices, Vectors, Fourier Analysis Spring 2020-2021

(a) Write a general expression involving the rates of flow x1 , x2 , x3 , x4 and suggest two possible
flow patterns that will ensure no traffic congestion.
(b) Suppose the part of 4th street between 5th Avenue and 6th Avenue is to be resurfaced and that
traffic flow between the two junctions must therefore be reduced to at most 300 vehicles per
hour. Find two possible flow patterns that will result in a smooth flow of traffic.

Solution:
(a) To avoid congestion, all traffic entering an intersection must also leave that intersection.
Applying this condition to each of the four intersections in a clockwise direction beginning
with the 5th Avenue and 4th Street intersection, we obtain the following equations:

1500 = x1 + x4
1300 = x1 + x2
1800 = x2 + x3
2000 = x3 + x 4
This system of four linear equations in the four variables x1 , x2 , x3 , x4 may be written in the more
standard form
x1 + x 4 = 1500
x1 + x2 = 1300
x2 + x3 = 1800
x3 + x4 = 2000

26
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Using Gauss-Jordan elimination method, we obtain


1 0 0 1 1500 
 
1 1 0 0 1300 
0 1 1 0 1800 
 
0 0 1 1 2000 
1 0 0 1 1500 
 
0
0
1
1
0 − 1 − 200 
1 0 1800 
R 2
/
= R2 − R1 
 
0 0 1 1 2000 

1 0 0 1 1500 
 
0
0
1
0
0 − 1 − 200 
1 1 2000 
R3
/
= R3 − R2 
 
0 0 1 1 2000 

1 0 0 1 1500 
 
0
0
1
0
0 − 1 − 200 
1 1 2000 
R 4
/
= R4 − R3 
 
0 0 0 0 0 

The last augmented matrix is in row-reduced form and is equivalent to a system of three linear
equations in the four variables x1 , x2 , x3 , x4 . This we may express three of the variables-say,
x1 , x 2 , x3 in terms of x 4 . Setting x4 = t (t a parameter), we may write the infinitely many solutions of
the system as
x1 = 1500 − t
x2 = −200 + t
x3 = 2000 − t
x4 = t
Observe that for a meaningful solution we must have 200  t  1000 since x1 , x2 , x3 and x4 must all
be nonnegative and the maximum capacity of a street is 1000.
For example, picking t = 300 gives the flow pattern
x1 = 1200, x2 = 100, x3 = 1700 , x4 = 300
Selecting t = 500 gives the flow pattern
x1 = 1000, x2 = 300, x3 = 1500 , x4 = 500
(b) In this case, x4 must not exceed 300. Again, using results of part(𝑎), we find, upon setting
x4 = t = 300, the flow pattern x1 = 1200, x2 = 100, x3 = 1700, x4 = 300 obtained earlier.
(c) Picking t = 250 gives the flow pattern x1 = 1250, x2 = 50, x3 = 1750, x4 = 250.

27
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Linear Programming:
Problem: A company manufactures and sells two models of lamps, L1 and L2. To manufacture each
lamp, the manual work involved in model L1 is 20 minutes and for L2, 30 minutes. The mechanical
(machine) work involved for L1 is 20 minutes and for L2, 10 minutes. The manual work available per
month is 100 hours and the machine is limited to only 80 hours per month. Knowing that the profit per
unit is 15 and 10 for L1 and L2, respectively, determine the quantities of each lamp that should be
manufactured to obtain the maximum benefit.
Solution:
Let
𝑥 = number of lamps L1
𝑦 = number of lamps L2
Objective function 𝑓(𝑥, 𝑦) = 15 𝑥 + 10 𝑦

Convert the time from minutes to hours.

20 min = 1/3 h 30 min = 1/2 h 10 min = 1/6 h

L1 L2 Time

Manual 1/3 1/2 100

Machine 1/3 1/6 80

Writing the constraints as a system of inequalities we get

1 1
𝑥 + 𝑦 ≤ 100
3 2
1 1
𝑥 + 𝑦 ≤ 80
3 6

As the numbers of lamps are natural numbers, we have 𝑥 ≥ 0 & 𝑦 ≥ 0

Represent the constraints graphically.

As 𝑥 ≥ 0 & 𝑦 ≥ 0, work in the first quadrant.


1 1
Solve the inequation graphically: 3 𝑥 + 𝑦 ≤ 100; and take a point on the plane, for example
2
(0,0).

1 1
· 0 + · 0 ≤ 100
3 2

28
Matrices, Vectors, Fourier Analysis Spring 2020-2021

1 1
· 0 + · 0 ≤ 80
3 6

The area of intersection of the solutions of the inequalities would be the solution to the system of
inequalities, which is the set of feasible solutions.

The optimal solution, if unique, is a vertex. These are the solutions to systems:

1 1
𝑥 + 𝑦 = 100; 𝑥 = 0 (0, 200)
3 2
1 1
𝑥 + 𝑦 = 80; 𝑦 = 0(240, 0)
3 6
1 1 1 1
𝑥 + 𝑦 = 100; 𝑥 + 𝑦 = 80(210, 60)
3 2 3 6

To determine which of them has the maximum or minimum values.

In the objective function, place each of the vertices that were determined in the previous step.

𝑓(𝑥, 𝑦) = 15𝑥 + 10𝑦

𝑓(0, 200) = 15 · 0 + 10 · 200 = 2000

𝑓(240,0) = 15240 + 100 = 3,600

𝑓(210, 60) = 15 · 210 + 10 · 60 = 3750

So, (210,60) is our required answer.

29
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Exercise 2
1. Test whether the systems of linear equations are consistent. If consistent find the solutions of
the system. Also check your answer by direct substitution.
a. x1 − 3 x2 = 2 b. 2 x1 − 3x2 = −2 c. − 2 x2 + 3x3 = 1
− 3 x1 + 9 x2 = 3 2 x1 + x2 = 1 3x1 + 6 x2 − 3x3 = −2
3x1 + 2 x2 = 1 6 x1 + 6 x2 + 3x3 = 5
Ans: Inconsistent
Ans: Inconsistent Ans: Inconsistent

d. 2 x1 − x2 + 3x3 = 5 e. −3x + 2y − 3z = −8 f. x1 + x2 + 2 x3 = 8
2x − y + z = 4 − x1 − 2 x2 + 3x3 = 1
− x1 + 3x2 + 5 x3 = 3
x + 2y − 4z = −2
− 4 x1 + 2 x2 − 6 x3 = 3 Ans. (2, 2, 2) 3x1 − 7 x2 + 4 x3 = 10

Ans: Inconsistent Ans: (3, 1, 2)

g. x + y + 2z = 1 h. x + 2y + 4z = −13 i. x1 − x2 + 2 x3 = 5
y + z =1 3x − y + z = 5 2 x1 + x2 − x3 = 2
x + 3y =3
−2 x + 3 y + z = 3 2 x1 − x2 − x3 = 4
Ans. (3, 0, −4)
Ans. (−1, 0, 1) Ans: (2, −1, 1)

j. 2x − y − 5 z = 4 k. 5 x + 3 y = 19 l. x1 + 2 x2 − 2 x3 = 2
x + y + z = −3 2 x − 7 y = −17 − x1 + x2 − 2 x3 = −1
− x −4y + z = 4 Ans: (2, 3) x1 − 4 x2 − 2 x3 = 8
Ans: (−1, − 1, − 1)
Ans: (2, −1, −1)

m. 2x − 3y + 4z = 8 n. 3x + y + 2z = 14 o. x+ y+z =0
3 x + 4 y − 5 z = −4 2y + 5z = 22 x− y+z =0
2x + 5y − z = −22
5x − 7 y + 6z = 9 x+ y−z =0
Ans: (2, −4 , 6)
Ans: (1, 2, 3) Ans: (0, 0, 0)

p. −x + y −z=0 q. x + 2y +3z =1 r. x + y + z = −1
3 x − y + 2 z = −2 x + 3y + 6z = 3 x − y + z = −5
2 x + 4 y + 3z = 2 2 x + 6 y + 13z = 5 2x + y − z = 5
Ans: (−2, 0, 2) Ans: (0, 2, −3)
Ans: (−6, 5, −1)

30
Matrices, Vectors, Fourier Analysis Spring 2020-2021

s. x + 2 y + 3z = 5 t. 3x + 2 y − z = −15 u. − x + 2 y + 2 z = −2
2 x + 5 y + 3z = 3 5x + 3 y + 2 z = 0 3x + 2 y − z = 9
x + 8 z = 17 3x + y + 3z = 11 x +4 y + z= 5
Ans: (1, −1, 2) −6 x − 4 y + 2 z = 30 Ans: (2, 1, −1)
Ans: (−4, 2, 7)

2. Determine the value(s) of  such that the following system of linear equations has (𝑖) no
solution, (𝑖𝑖) more than one solution, and (𝑖𝑖𝑖) a unique solution.
x + y + z = 1

 x + y + z = 1 .
 x + y + z = 1

Ans: (𝑖) 𝜆 = −2, (𝑖𝑖) 𝜆 = 1, (𝑖𝑖𝑖) 𝜆 ≠ 1, 𝜆 ≠ −2.

3. Determine the value(s) of  such that the following system of linear equations has (𝑖) no
solution, (𝑖𝑖) more than one solution, and (𝑖𝑖𝑖) a unique solution.
x − 3z = −3

2 x + y − z = −2 .
 x + 2 y + z = 1

Ans: (𝑖) 𝜆 = −5, (𝑖𝑖) 𝜆 = 2, (𝑖𝑖𝑖) 𝜆 ≠ 2, 𝜆 ≠ −5.

4. Determine the value(s) of  and 𝜇 such that the following system of linear equations has (i)
no solution, (ii) more than one solutions and (iii) a unique solution.

𝑥+𝑦 +𝑧 =2
𝑥 + 3𝑦 + 𝜆𝑧 = 6.
𝑥 + 2𝑦 + 3𝑧 = 𝜇

Ans: (𝑖) 𝜆 = 5, 𝜇 ≠ 4, (𝑖𝑖) 𝜆 = 5, 𝜇 = 4, (𝑖𝑖𝑖) 𝜆 ≠ 5.

5. Determine the value(s) of  such that the following system of linear equations has (𝑖) no
solution, (𝑖𝑖) more than one solution, and (𝑖𝑖𝑖) a unique solution.
 x + y + z = 1

 x + y + z =  .
x + y + z = 2

Ans: (𝑖) 𝜆 = −2, (𝑖𝑖) 𝜆 = 1, (𝑖𝑖𝑖) 𝜆 ≠ 1, 𝜆 ≠ −2.

6. The network in the figure below shows the traffic flow (in vehicles per hour) over the
several one-way streets. Determine the general flow pattern for the network.

31
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Ans: Here 𝑥3 and 𝑥5 are free variables.

7. The network in the figure below shows the traffic flow (in vehicles per hour) over the several
one-way streets. Determine the general flow pattern for the network.
a. b.

Ans: (a) Here 𝑥3 is the free variable. The system has an infinite number of solutions. But to
remove negativity 𝑥3 must be between 0 to 500.

(b) Here 𝑥3 is the free variable. The system has an infinite number of solutions. But to
remove negativity 𝑥3 must be greater than 500.

8. The network in the figure below shows the traffic flow (in vehicles per hour) over the
several one-way streets. Determine the general flow pattern for the network.

32
Matrices, Vectors, Fourier Analysis Spring 2020-2021

Ans: Here 𝑥5 is the free variable. The system has an infinite number of solutions. But to
remove negativity 𝑥5 must start from 200.

9. A company produces three products 𝑥, 𝑦, 𝑧 every day. Their total production on a certain day
is 45 tons. It is found that the production of 𝑧 exceeds the production of 𝑥 by 8 tons while the
total production of ‘𝑥’ and ‘𝑧’ is twice the production of ‘𝑦’. Determine the production level of
the each product.

Ans: 𝑥 = 1; 𝑦 = 15; 𝑧 = 19.

10. Determine the loop currents using mesh analysis.

(a) 𝐸1 = 15 V, 𝐸2 = 6 V, 𝐸3 = 10 V, 𝑅1 = 1 Ω, 𝑅2 = 2 Ω, 𝑅3 = 2Ω, 𝑅4 = 2Ω, 𝑅5 = 1Ω.

(b) 𝐸1 = 15 V, 𝐸2 = 6 V, 𝑅1 = 1Ω, 𝑅2 = 2Ω, 𝑅3 = 2Ω.

a) b)

Ans: (a) 𝐼1 = 4.638 𝐴, 𝐼2 = 1.776 𝐴, 𝐼3 = −2.844 𝐴, (b) 𝐼1 = 5.1 𝐴, 𝐼2 = 2.7𝐴.

33
Matrices, Vectors, Fourier Analysis Spring 2020-2021

11. Determine the loop currents I 1 and I 2 of the following circuit using mesh analysis.
Where 𝐸1 = 28 , 𝐸2 = 7 V, 𝑅1 = 4 Ω, 𝑅2 = 1Ω, 𝑅3 = 2Ω.

Answer: 𝐼1 = −5 𝐴, 𝐼2 = 1 𝐴.

12. A transport company has two types of trucks, Type A and Type B. Type A has a refrigerated
capacity of 20 m³ and a non-refrigerated capacity of 40 m³ while Type B has the same overall
volume with equal sections for refrigerated and non-refrigerated stock. A grocer needs to hire trucks
for the transport of 3,000 m³ of refrigerated stock and 4,000 m³ of non-refrigerated stock. The cost
per kilometer of a Type A is 30 and 40 for Type B. How many trucks of each type should the grocer
rent to achieve the minimum total cost?

Supplementary:

MATLab command for finding unique solution(if exists) of a system of


equation:
3 x + 2 y − z = 20
2 x + 3 y − 3z = 7
x − y + 6 z = 41
Ans: (5,6,7)

For Input Command Output

Coefficient matrix: >> A = [3 2 -1;2 3 -3;1 -1 6] A=


3 2 −1 3 2 -1
𝐴 = (2 3 −3)
2 3 -3
1 −1 6

34
Matrices, Vectors, Fourier Analysis Spring 2020-2021

1 -1 6

Right hand side matrix: >> B= [20;7;41] B=


20 20
𝐵=(7)
7
41
41
checking whether there >> if det(A)~=0 There exists a unique
exists a unique solution or disp ('There exists a solution for the given
not! unique solution for the system.
given system.')
else
disp ('There is no
unique solution for the
given system.')
end
𝑥 >> X=inv(A)*B X=
Solution set, 𝑋 = (𝑦)
𝑧 5.0000
where, 𝑋 = 𝐴−1 𝐵 6.0000
7.0000

35

You might also like