0% found this document useful (0 votes)
34 views46 pages

LINEAR - ALGEB Lecture 4

The document discusses solving systems of linear equations using Gaussian elimination. It defines linear equations and systems of linear equations. It explains augmented matrices and row echelon form. It provides examples of using Gaussian elimination to solve systems of linear equations step-by-step and discusses what it means if a system is inconsistent.

Uploaded by

tarek yehia
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
0% found this document useful (0 votes)
34 views46 pages

LINEAR - ALGEB Lecture 4

The document discusses solving systems of linear equations using Gaussian elimination. It defines linear equations and systems of linear equations. It explains augmented matrices and row echelon form. It provides examples of using Gaussian elimination to solve systems of linear equations step-by-step and discusses what it means if a system is inconsistent.

Uploaded by

tarek yehia
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/ 46

LINEAR ALGEBRA (DS505)

Lecture 4
Solving System of Linear Equations

2
Dr. Marwa Abd-Allah
Solving System of Linear Equations
 linear algebra arose from the study of systems of linear equations & Solving systems of
linear equations is one of the most important applications of linear algebra.
 The majority of all mathematical problems encountered in scientific and industrial
applications involve solving a linear system at some point.
 Linear applications arise in such diverse areas as engineering, chemistry, economics,
business, ecology, biology, and psychology.
 In real-world situations, it is not unusual to have to solve systems of hundreds or even
thousands of equations.
 One of the early goals of this course is to develop an algorithm that helps solve larger
systems in an orderly manner and is amenable to computer implementation.

Dr. Marwa Abd-Allah 3


Linear Equations
 Recall that in two dimensions a line in a rectangular xy-coordinate system can be
represented by an equation of the form
ax + by =c, (a,b not both 0)
 and in three dimensions a plane in a rectangular xyz-coordinate system can be
represented by an equation of the form
ax + by + cz =d, (a,b,cnot all 0)
 We define a linear equation in the n variables x1, x2, . . . , xn to be one that can be
expressed in the form
a1x1 + a2x2 +· · ·+anxn = b
where a1, a2, . . . , an and b are constants, and the a’s are not all zero.

Dr. Marwa Abd-Allah 4


Linear Equations
 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, for example, as arguments of
trigonometric, logarithmic, or exponential functions. The following are linear
equations:

 The following are not linear equations:

Dr. Marwa Abd-Allah 5


H.W

Dr. Marwa Abd-Allah 6


linear system of equations
 A general linear system of m equations in n unknowns x1, x2, . . . , xn can be written

 A solution of a linear system in n unknowns x1, x2, . . . , xn is a sequence of n numbers


s1, s2, . . . , sn for which the substitution x1 = s1, x2 = s2, . . . , xn = sn makes each equation
a true statement.

Dr. Marwa Abd-Allah 7


Solving System of Linear Equations
 Linear systems in two unknowns arise in connection with intersections of lines. For example,
consider the linear system a1x + b1y = c1
a2x + b2y = c2
 In which the graphs of the equations are lines in the xy-plane. Each solution (x, y) of this
system corresponds to a point of intersection of the lines, so there are three possibilities

Every system of linear


equations has zero, one,
or infinitely many
solutions. There are no
other possibilities.

Dr. Marwa Abd-Allah 8


Gaussian Elimination Method with Back-Substitution

To Solve System of Linear Equation

9
Dr. Marwa Abd-Allah
Steps of Gaussian Elimination Method
1. Write the augmented matrix of the system of linear equations.
2. Use elementary row operations to rewrite the augmented matrix in row-echelon form.
3. Write the system of linear equations corresponding to the matrix in row-echelon form,
and use back-substitution to find the solution.

But what is augmented matrix & row-echelon form ?????

Dr. Marwa Abd-Allah 10


The Augmented Matrix Of The System
 One very common use of matrices is to represent systems of linear equations. The
matrix derived from the coefficients and constant terms of a system of linear
equations is called the augmented matrix of the system.
 The matrix containing only the coefficients of the system is called the coefficient
matrix of the system. Here is an example.

Dr. Marwa Abd-Allah 11


The Augmented Matrix Of The System
 When forming either the coefficient matrix or the augmented matrix of a system, you
should begin by aligning the variables in the equations vertically.

Dr. Marwa Abd-Allah 12


Row-echelon & Reduced Row-echelon Form
A matrix in row-echelon form has the following properties.
1. All rows consisting entirely of zeros occur at the bottom of the matrix.
2. For each row that does not consist entirely of zeros, the first nonzero entry is 1 (called
a leading 1).
3. For two successive (nonzero) rows, the leading 1 in the higher row is farther to the left
than the leading 1 in the lower row.

R E M A R K : A matrix in row-echelon form is in reduced row-echelon form if every


column that has a leading 1 has zeros in every position above and below its leading 1.

Dr. Marwa Abd-Allah 13


Row-echelon & Reduced Row-echelon Form
 The matrices below are in row-echelon form.

 The matrices shown in parts (b) and (d) are in reduced row-echelon form. The matrices
listed below are not in row-echelon form.

Dr. Marwa Abd-Allah 14


H.W

Dr. Marwa Abd-Allah 15


Back to

Steps of Gaussian Elimination Method

16
Dr. Marwa Abd-Allah
Steps of Gaussian Elimination Method
1. Write the augmented matrix of the system of linear equations.
2. Use elementary row operations to rewrite the augmented matrix in row-echelon form.
3. Write the system of linear equations corresponding to the matrix in row-echelon form,
and use back-substitution to find the solution.

Dr. Marwa Abd-Allah 17


Example
Solve the following system using Gaussian Elimination Method .
x-2y=-3
2x+3y=8
Solution
1- Write the augmented matrix
 1 2 3 
2 3 8 
 
2- rewrite the augmented matrix in row-echelon form
 1 2 3  1 2 3   1 2 3 
2 3 8  2 R1  R2  0 7 14  1 0 1 
     
R
7 2
  2 

Dr. Marwa Abd-Allah 18


3. Write the system of linear equations corresponding to the matrix in row-echelon form,
and use back-substitution to find the solution.
x-2y=-3
y=2 and x=1
thus the solution is x= 1, y= 2

Dr. Marwa Abd-Allah 19


Example
Solve the system

Solution 1- The augmented matrix for this system is

2- rewrite the augmented matrix in row-echelon form

Dr. Marwa Abd-Allah 20


Now that the first column is in the desired form, you should change the second column as shown below.

Dr. Marwa Abd-Allah 21


Dr. Marwa Abd-Allah 22
When solving a system of linear equations, remember that it is possible for the system to

have no solution. If during the elimination process you obtain a row with all zeros except

for the last entry, it is unnecessary to continue the elimination process. You can simply

conclude that the system is inconsistent and has no solution.

Dr. Marwa Abd-Allah 23


Example
Solve the system

Apply Gaussian elimination to the augmented matrix.


Dr. Marwa Abd-Allah 24
Note that the third row of this matrix consists of
all zeros except for the last entry. This means
that the original system of linear equations is
inconsistent. You can see why this is true by
converting back to a system of linear equations.

Because the third “equation” is a false


statement, “0x1 + 0x2 + 0x3 =-2”,the system
has no solution.

Dr. Marwa Abd-Allah 25


Example
Solve the system

Solution: The system of linear equations has the following augmented matrix

Dr. Marwa Abd-Allah 26


 The last matrix is in row - echelon form. The corresponding reduced system is:

Dr. Marwa Abd-Allah 27


Dr. Marwa Abd-Allah 28
H.W
1- Solve the following system of linear equations by using the Gauss elimination
method:

2- Solve the following system of linear equations by using the Gauss elimination
method:

Dr. Marwa Abd-Allah 29


Gauss-Jordan Elimination

30
Dr. Marwa Abd-Allah
Gauss-Jordan Elimination
With Gaussian elimination, you apply elementary row operations to a matrix to obtain a
(row-equivalent) row-echelon form. A second method of elimination, called Gauss-
Jordan elimination after Carl Gauss and Wilhelm Jordan (1842–1899), continues the
reduction process until a reduced row-echelon form is obtained. This procedure is
demonstrated in the next example.

Dr. Marwa Abd-Allah 31


Gauss-Jordan Elimination
Example
Use Gauss-Jordan elimination to solve the system.

Solution

Dr. Marwa Abd-Allah 32


Dr. Marwa Abd-Allah 33
Gauss-Jordan Elimination
Example
Use Gauss-Jordan elimination to solve the system.

Solution

the reduced row-echelon form of the matrix is

Dr. Marwa Abd-Allah 34


Dr. Marwa Abd-Allah 35
Applications of Linear Systems

36
Dr. Marwa Abd-Allah
Applications of Linear Systems
 In this section we will discuss some brief applications of linear systems. These are but
a small sample of the wide variety of real-world problems to which our study of linear
systems is applicable.
 two very important applications are as follows,
1- The first application shows how to fit a polynomial function to a set of data points in
the plane.
2- The second application focuses on networks and Kirchhoff’s Laws for electricity.

Dr. Marwa Abd-Allah 37


Network Analysis & Kirchhoff’s Laws for electricity
 Networks composed of branches and junctions are used as models in many diverse fields such as
economics, traffic analysis, and electrical engineering.
 Network is a set of branches through which something “flows.” For example, the branches might
be electrical wires through which electricity flows, pipes through which water or oil flows, traffic
lanes through which vehicular traffic flows, or economic linkages through which money flows.
 In such models it is assumed that the total flow into a junction is equal to the total flow out of the
junction.
• For example, because the junction shown in this Figure has 25 units
flowing into it, there must be 25 units flowing out of it. This is represented
by the linear equation
• Because each junction in a network gives rise to a linear equation,
you can analyze the flow through a network composed of several
junctions by solving a system of linear equations.
This procedure is illustrated in the following Example.
Dr. Marwa Abd-Allah 38
EXAMPLE: Analysis of a Network
Set up a system of linear equations to represent the network shown in the following Figure, and solve
the system.

Dr. Marwa Abd-Allah 39


EXAMPLE: Analysis of a Network

• Where t is a real number, so this system has an infinite


number of solutions.

Dr. Marwa Abd-Allah 40


EXAMPLE: Analysis of a Network
 suppose you could control the amount of flow along the branch labeled x5, you could then control the
flow represented by each of the other variables.
 For instance, letting t=20 would produce the network shown
 This type network analysis demonstrated here can be used in
problems dealing with the flow of traffic through the streets of a
city or the flow of water through an irrigation system.

Dr. Marwa Abd-Allah 41


Kirchhoff’s Laws.
 An electrical network is another type of network where analysis is commonly applied.
 An analysis of such a system uses two properties of electrical networks known as Kirchhoff’s Laws.
1. All the current flowing into a junction must flow out of it.
2. The sum of the products IR(I is current and R is resistance) around a closed path is equal to the total
voltage in the path.
 In an electrical network, current is measured in amps, resistance in ohms, and the product of current and
resistance in volts. Batteries are represented by the symbol . . The larger vertical bar denotes
where the current flows out of the terminal. Resistance is denoted by the symbol . The
direction of the current is indicated by an arrow in the branch.

Dr. Marwa Abd-Allah 42


Kirchhoff’s Laws.

Dr. Marwa Abd-Allah 43


Kirchhoff’s Laws.

Dr. Marwa Abd-Allah 44


End of Lecture

Dr. Marwa Abd-Allah 45


Dr. Marwa Abd-Allah
46

You might also like