MTPDF5 Systems of Linear Equations

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

Linear Algebra

Application on Matrices: Systems


of Linear Equations
MPS Department|FEU Institute of Technology
Linear Algebra

Solving System of Linear


Equations by Guass-Jordan
Method
MPS Department|FEU Institute of Technology
OBJECTIVES
At the end of the discussion, the learner should be able to:
• Solve systems of linear equations using Gauss-Jordan elimination
and Gaussian elimination.
This method of solving system of linear equations is applicable for
any number of equations and any number of variable in the
system.
Solve the system of equations.

x + y – z = –2
2x – y + z = 5
–x + 2y + 2z = 1
Write the system of equations in augmented matrix form.

augmented matrix
x + y – z = –2
2x – y + z = 5
–x + 2y + 2z = 1
Use elementary row operations to write the matrix in the form,
𝐼 | 𝐵 , if possible,

Note: If at any point in this process we obtain a row with all


zeros to the left of the vertical line and a nonzero number to
the right, we can stop because we will have a contradiction.
❑ Any linear system must have exactly one solution, no
solution, or an infinite number of solutions.

❑ Note: A linear system is


➢consistent if it has a unique solution.
➢inconsistent if it has no solution.
➢dependent if it has an infinite number of solutions.
▪ The following matrix representations of three linear
equations in three unknowns illustrate the three different
cases:

• Case I: consistent • From this matrix


representation, you can
1 0 0 3
  determine that
0 1 0 4 x=3
0 0 1 
5
y=4
 z=5
• Case 2: inconsistent
• From the second row of the
1 2 3 4
  matrix, we find that
0 0 0 6 0x + 0y +0z =6
0 0 0 0 
or
 0 = 6,
an impossible equation. From
this, we conclude that there are
no solutions to the linear system.
• Case 3: dependent

1 2 3 4 • When there are fewer non-


  zero rows of a system than
0 0 0 0 there are variables, there
0 0 0 0 
will be infinitely many
 solutions, and therefore the
system is dependent.
Solve
x + y – z = –2
2x – y + z = 5
–x + 2y + 2z = 1
Solution:
We begin by writing the system as an augmented matrix
▪ We already have a 1 in the diagonal position  1 1 −1 −2 
of first column.  2 −1 1 5  
▪ Now we want 0’s below the 1.  
 −1 2 2 1 
▪ The first 0 can be obtained by multiplying
row 1 by –2 and adding the results to row 2:
▪ Row 1 is unchanged
▪ (–2) times Row 1 is added to Row 2
𝑅2 → −2𝑅1 + 𝑅2
▪ Row 3 is unchanged
The second 0 can be obtained by
adding row 1 to row 3:
• Row 1 is unchanged
• Row 2 is unchanged
• Row 1 is added to Row 3
Moving to the second column, we want
a 1 in the diagonal position (where there
was a –3). We get this by dividing every
element in row 2 by -3:
• Row 1 is unchanged
• Row 2 is divided by –3
• Row 3 is unchanged
To obtain a 0 below the 1 , we multiply
row 2 by –3 and add it to the third row:
• Row 1 is unchanged
• Row 2 is unchanged
• (–3) times row 2 is added to row 3
To obtain a 1 in the third position of
the third row, we divide that row by
4. Rows 1 and 2 do not change.
▪ We can now work upwards to get zeros
in the third column, above the 1 in the
third row.
▪ 𝑅1 → 𝑅3 + 𝑅1
▪ 𝑅2 → 𝑅3 + 𝑅2
▪ Row 3 will not be changed.

1 1 0 0
▪All that remains to obtain reduced row  
echelon form is to eliminate the 1 in the
first row, 2nd position.
0 1 0 − 1
0 0 1 2 

To get a zero in the first row and 1 1 0 0
second position, we multiply row 2 by  
–1 and add the result to row 1. Thus, 0 1 0 − 1
▪ 𝑅1 → −1 𝑅2 + 𝑅1 0 0 1 2 

▪ 𝑅2 is unchanged
▪ 𝑅3 is unchanged
1 0 0 1
 
0 1 0 − 1
0 0 1 2 

We can now “read” our solution from
1 0 0 1
 
this last matrix. We have

− 1
x = 1,
y = –1 0 1 0
z = 2.
0 0 1 2 
Written as an ordered triple, we have (1,
–1, 2). This is a consistent system with

a unique solution.
Find the solution.

𝟑𝒙 + 𝟕𝒚 – 𝟏𝟏𝒛 = 𝟒𝟒
𝒙 + 𝟐𝒚 – 𝟑𝒛 = 𝟏𝟐
𝟒𝒙 + 𝟗𝒚 – 𝟏𝟑𝒛 = 𝟓𝟑
3𝑥 + 7𝑦 – 11𝑧 = 44
𝑥 + 2𝑦 – 3𝑧 = 12
4𝑥 + 9𝑦 – 13𝑧 = 53
We have an augmented matrix
3 7 −11 44
1 2 −3 ቮ12
4 9 −13 53
From here, we Gauss-Jordan Reduction. i.e., apply series of elementary
operations.
3 7 −11 44 𝑅1 ↔ 𝑅2 1 2 −3 12 3𝑅1 − 𝑅2 1 2 −3 12
1 2 −3 ቮ12 3 7 −11 ቮ44 0 −1 2 ቮ−8
4 9 −13 53 4 9 −13 53 4 9 −13 53
1 2 −3 12 4𝑅1 − 𝑅3
1 2 −3 12 𝑅2 − 𝑅3
1 2 −3 12
0 −1 2 ቮ−8 0 −1 2 ቮ−8 0 −1 2 ቮ−8
4 9 −13 53 0 −1 1 −5 0 0 1 −3

2𝑅2 + 𝑅1 1 0 1 −4 2𝑅3 − 𝑅2
1 0 1 −4 𝑅3 − 𝑅1
−1 0 0 1
0 −1 2 ቮ−8 0 −1 0 ቮ−2 0 −1 0 ቮ−2
0 0 1 −3 0 0 1 −3 0 0 1 −3

−𝑅1 𝑎𝑛𝑑 − 𝑅2
1 0 0 −1 𝒙 = −𝟏
0 1 0 ቮ 2 . Therefore, we obtain 𝒚 = 𝟐 .
0 0 1 −3 𝒛 = −𝟑
Find the solution.

𝒙 +𝒚 + 𝒛 = 𝟑
𝟐𝒙 + 𝒚 + 𝟒𝒛 = 𝟖
𝒙 + 𝟐𝒚 – 𝒛 = 𝟏
1 1 1 3 𝑅1 − 𝑅3
1 1 1 3 2𝑅1 − 𝑅2
1 1 1 3
2 1 4 ቮ8 2 1 4 ቮ8 0 1 −2 ቮ−2
1 2 −1 1 0 −1 2 2 0 −1 2 2

1 1 1 3 −𝑅2 + 𝑅1
1 0 3 5
𝑅2 + 𝑅3
0 1 −2 ቮ−2 0 1 −2 ቮ−2 .
0 0 0 0 0 0 0 0
Here, we obtained a row with entirely zero entries. Thus, the system is dependent. That is,
there are infinitely many solutions. Moreover, we also conclude that
𝑥 = 5 − 3𝑧, 𝑦 = 2𝑧 − 2 for any real number 𝑧 are solutions to the system of linear
equations.
Find the solution.

𝒙 + 𝟐𝒚 − 𝟑𝒛 = −𝟏
𝟐𝒙 + 𝟑𝒚 − 𝟒𝒛 + 𝒘 = −𝟏
𝟑𝒙 + 𝟓𝒚 – 𝟕𝒛 + 𝒘 = −𝟑
1 2 −3 0 −1 3𝑅1 − 𝑅3
1 2 −3 0 −1 2𝑅1 − 𝑅2
2 3 −4 1 ቮ−1 2 3 −4 1 ቮ−1
3 5 −7 1 −3 0 1 −2 −1 0

1 2 −3 0 −1 𝑅2 − 𝑅3 1 2 −3 0 −1
0 1 −2 −1 ቮ−1 2 3 −4 1 ቮ−1 .
0 1 −2 −1 0 0 0 0 0 −1
Observe that the left side of 3rd row consists entirely of zeros and we have −1 on the
right side. Hence, we have a contradiction! Therefore, the system is inconsistent. i.e.,
it has no solution.
Linear Algebra

Solving System of Linear


Equations with Nonsingular
Coefficient Matrix
MPS Department|FEU Institute of Technology
OBJECTIVES
At the end of the discussion, the learner should be able to:
• Solve systems of linear equations using inverse matrix and Cramer’s
Rule.
A system of m linear equations in n unknowns
a11x1 + a12 x2 +  + a1n xn = b1
a21x1 + a22 x2 +  + a2 n xn = b2
 
am1 x1 + am 2 x2 +  + amn xn = bm

can be written as DX = B, where

 x1   b1 
   
 x2   b2 
X= , B= 
 
   
 xn   bm 
Thus, Cramer’s rule is only applicable of systems of linear
equations whose coefficient matrix is a square matrix and it should
have a nonzero determinant.
Use Cramer’s rule to solve the system.

5x + 7 y = − 1
6x + 8 y = 1
Use Cramer’s rule to solve the system.
5x + 7 y = − 1
6x + 8 y = 1
Solution:
Solve the system using Cramer’s Rule
Solve the system using Cramer’s Rule

Solution
Rewrite each equation
in the form
ax + by + cz + = k.
Solve the system using Cramer’s Rule

Solution: The required determinants are


Solve the system using Cramer’s Rule

Solution: Thus,
Use Cramer’s rule to solve the system.

3x1 + 2 x2 + x3 = 7
x1 − x2 + 3 x3 = 3
5 x1 + 4 x2 − 2 x3 = 1
3 2 1
The coefficient matrix of the system is D = 1 −1 3 with
5 4 −2
7
𝐵 = 3 and 𝐷 = 13. Thus, we can apply Cramer’s Rule to
1
solve for the unknowns.
7 2 1
𝐷𝑥 = 3 −1 3 and 𝐷𝑥 = −39
1 4 −2
7 2 1
Therefore, we have the
𝐷𝑥1 = 3 −1 3 and 𝐷𝑥1 = −39. following results:
1 4 −2 𝑥1 = −
39
= 3.
13
78
3 7 1 𝑥2 =
13
= 6.
52
Dx2 = 1 3 3 and 𝐷𝑥2 = 78. 𝑥3 = = 4.
13
5 1 −2

3 2 1
Dx3 = 1 −1 3 and Dx3 = 52.
5 4 −2
Let A be a square matrix. If there is a square matrix B such that
AB = I and BA = I, where I is the identity matrix
then A and B are inverses of one another. The inverse of matrix A is
denoted by A-1.
• Use matrix inverses to solve the 1. Determine the matrix of
system below: coefficients, A, the matrix X,
containing the variables x, y, and
x +y +2 z = 1 z. and the column matrix B,
2x +y =2 containing the numbers on the
right-hand side of the equal sign.
x +2 y +2 z = 3
1 1 2   x 1 
A =  2 1 0  X =  y  B =  2 
1 2 2   z   3 
2. Form the matrix equation AX=B .
x +y +2 z = 1 Multiply the 3 x 3 matrix A by the 3
x 1 matrix X to verify that this
2x +y =2 multiplication produces the 3 x 3
x +2 y +2 z = 3 system on the left:

1 1 2   x  1 
2 1 0    = 2
   y  
1 2 2   z   3 
 
• If the matrix A inverse exists, then the • The inverse matrix A can be
solution is determined by multiplying determined by the methods of a
A inverse by the column matrix B. previous section or by using a
Since A inverse is 3 x 3 and B is 3 x 1, computer or calculator. The display
the resulting product will have is shown below:
dimensions 3 x1 and will store the
values of x , y and z. 1 1 −1 
2 2 2  1 
−1   
X=A B X =  −1 0
 3 −1
1  2
−1   3 
 
4 4 4
When the product of A inverse and • The solution can be interpreted from
matrix B is found the result is as the X matrix: x = 0, y = 2 and z = -1/2 .
follows: −1 Written as an ordered triple of numbers,
X=A B the solution is
1 1 −1 
2 2 2  1 
• (0 , 2 , -1/2)
 
X =  −1 0 1   2 
 3 −1 −1   3 
 
4 4 4

 
0
 
X = 2 
 −1 
 
2
Use inverse matrix to solve the system.

5x + 7 y = − 1
6x + 8 y = 1
5 7 −1
𝐴= and 𝐵 = . Finding the inverse of 𝐴, we have
6 8 1
𝐴 = 40 − 42 = −2
−8 7
−1 8 −7
−1
𝐴 = ⋅ = 2 2 .
2 −6 5 6 5

𝑥 2 2
−1 8 −7 −1
Therefore, 𝑦 = 2 ⋅ ⋅
−6 5 1
15
−1 −8 − 7 2
= = 11 .
2 6+5 −2
References
• Howard Anton, Chris Rorres (2008). Elementary Linear Algebra Applications 9th ed, John
Wiley and Sons
• Larson R. (2015), Elementary Linear Algebra 8th Edition, Cengage Learning
• Poole D. (2015), Linear Algebra: A Modern Introduction 4th Edition, USA: Cengage Learning
• Http://Homepage.ntu.edu.tw/~Jryanwang/Course/Mathematics%20for%20Management%20(
Undergraduate%20level)/MM_Ch04.Pptx,
homepage.ntu.edu.tw/~jryanwang/course/Mathematics%20for%20Management%20(underg
raduate%20level)/MM_Ch04.pptx.
• Http://Mathsci.kaist.ac.kr/~Schoi/lin2007IICh2.Ppt,
mathsci.kaist.ac.kr/~schoi/lin2007IICh2.ppt.
• Http://Www.gc11.Ac.in/Wp-Content/Uploads/2017/02/Vector-Space.ppt, www.gc11.ac.in/wp-
content/uploads/2017/02/Vector-Space.ppt.
• Https://Www.math.tamu.edu/~Dallen/m640_03c/Lectures/chapter1.Pdf,
www.math.tamu.edu/~dallen/m640_03c/lectures/chapter1.pdf.
• Https://Www.math.uh.edu/~Josic/old_website/Myweb/Teaching/Linear%20algebra/Slides/lec
ture_03_06.Ppt,
www.math.uh.edu/~josic/old_website/myweb/teaching/linear%20algebra/slides/lecture_03_0
6.ppt.

You might also like