You are on page 1of 53

SOLVING SYSTEMS OF

EQUATIONS

MATH 15-1
LINEAR ALGEBRA
Week 2
Skills Objectives
• Determine whether a given equation is linear.
• Determine whether a given n-tuple is a solution of a linear
system.
• Find the augmented matrix of a linear system.
• Find the linear system corresponding to a given augmented
matrix.
• Recognize whether a given matrix is in row echelon or
reduced row echelon form or neither.
• Construct solutions to linear systems whose corresponding
augmented matrices are in REF or RREF.
• Use Gaussian and Gauss Jordan elimination to find the general
solution of a linear system and a homogeneous linear system.
• Solve real life application problems.
• linear
A   equation is a first degree equation in n variables ,, …, that
can be expressed as
++….+= b
where ,,…, and b are constants, and the a’s are not all zero.

In the special case where b=0, then the equation of the form +
+….+
is called a homogeneous linear equation in the variables, ,, …, .

A linear equation does not involve any products or roots of


variables, as arguments of trigonometric, logarithmic or exponential
functions. All variables appear only to the first power.
•Let  , , …, be n variables and suppose bi ,Aij for 1then
A
A

is called a system of linear equations. If for


then the system is homogeneous. The solution set is
the set of all (, ,…, ) m which satisfy all the equations in
the system simultaneously.
System of two linear equations in two variables

•  
Consider the following system of two linear equations
in 2 unknowns

Adding equation reveals

Hence the solution (1,1) is unique. The system is


consistent and independent.
•  
Consider the following system of two equations in 2
unknowns,

If we multiply the second equation by 1/2, the second


equation will be equal to the first equation
he solutions are for all . The system of equation has
infinitely many solutions of the form (x,y) where .
The system is thus still consistent but dependent.
•Consider
  the following system of 2 equations in 2
unknowns,

Subtracting the 2nd equation yields 0 = 3. The system


has no solution and is hence, inconsistent.
Solutions to System of Linear Equations

The given examples has given us three cases of the


general structure of solutions to linear systems. We
either get
(i) one unique solution (independent, consistent)
(ii) an infinitely many solutions(dependent, consistent)
(iii) or no solution at all (inconsistent).
Consequently, each case correspond to a pair of lines in
the plane.
Graph of System of 2 linear equations with 2
unknowns
A pair of lines may intersect at one point (unique
solution), be the same line (infinitely many solutions),
or be parallel (no solution).
•   Theorem: A system of equation in two variables of the form
is

CONSISTENT if any of the ratio of


the coefficients
are not equal:

DEPENDENT if its coefficients has


the ratio:

INCONSISTENT if its coefficients


has the ratio:
Parametric Solution
•One
  way to describe the solution set for a dependent
system is to solve for one variable ( eg. x) in terms of
another variable (eg. y) and then assigning an arbitrary
value t (called parameter) to y. This allows to express
the solution by the pair of equations ( called parametric
equations).
 Example: In each part, find the solution set of the
linear equations by using parameters as necessary.
a.) 2x+4y= 3 b.) 3-5++4= 9
•EXERCISES
 
1. Determine whether the equation is linear in x1, x2, and x3.

2. Determine whether the equations form a linear system.


b.

c.

3. Determine whether (5, 8,1) is a solution to

4. Give the parametric solution to the following dependent system.


i. =4 ii. 3 + 6=0
=9 25= -2
Matrix Notation
•   augmented coefficient matrix is an array of numbers which
The
provides an abbreviated notation for a system of linear equations.
For example,

can be written in matrix notation as


The vertical bar is optional and is used to separate the matrix of
coefficient and the nonhomogeneous term.
•Exercises:
 
A. Find the augmented matrix for the given system of linear
equation.
i. -2x1=6 ii. 2x1 +2x3=1
9=-3 3x1-x2+4x3=7
3= 8 6x1+x2- x3 =0
B. Find a system of linear equations corresponding to the given
augmented matrix.
i. ii. iii.
SOLVING SYSTEM OF EQUATIONS USING THE GAUSS-JORDAN
ALGORITHM

The basic method for solving linear systems is to perform


elementary row operations on the augmented matrix. The
process involves the following steps:
1. Multiply a row through by a nonzero constant.
2. Interchange two rows.
3. Add a constant times one row to another.
Gauss Jordan Algorithm
•   system and has augmented coefficient matrix. After
The
a series of row operations (addition, subtraction, scalar
multiplication of rows), the matrix is transformed into
row echelon form (REF) (2nd to the last matrix).
Additional step leads to reduced row echelon form
(RREF) (last matrix).

The matrix in RREF gives The first two steps is called


the forward phase and the last step the backward
phase.
Gaussian Elimination is a process of solving the linear
system by a series of elementary row operations on the
matrix until it is transformed into a Row Echelon Form
(REF) after which the rest of the unknowns are solved by
back substitution.

An augmented matrix is in row echelon form (REF) if it has the


following properties:
1. If a row does not consist entirely of zeros, then the first
nonzero number in the row is a 1 (leading one).
2. If there are any rows that consist entirely of zeros, then they
are grouped together at the bottom of the matrix.
3. In any two successive rows that do not consist entirely of
zeros, the leading 1 in the lower row occurs farther to the right
than the leading 1 in the higher row.
In Gaussian elimination, only the forward phase is performed.
REDUCTION TO ROW ECHELON FORM (Forward Phase)
• Start by obtaining 1 in the top left corner. Then
obtain zeros below that 1 by adding appropriate
multiples of the first row to the rows below it.
• Next, obtain a leading 1 in the next row, and then
obtain zeros below that 1.
• At each stage make sure that every leading entry is
to the right of the leading entry in the row above
it−rearrange the rows if necessary.
• Continue this process until you arrive at a matrix in
row-echelon form.
Example of Gaussian Elimination
Gauss-Jordan Elimination is an algorithm that consists
of two parts, a forward phase in which zeros are
introduced below the leading 1’s
 1 𝑏 𝑐 𝑑

[𝑒
𝑖
𝑓
𝑗
𝑔
𝑘
h
𝑙 ]
and a backward phase in which zeros are introduced
above the leading 1’s.

An augmented matrix is in reduced row echelon form


(RREF) if in each column that contains a leading 1 has
zeros everywhere else in that column.
Example of Gauss Jordan Elimination

Solve a system by Gauss Jordan Elimination Method


•  
Consider the system and augmented matrix shown
below. Performing elementary row operation resulted
to an augmented matrix with zeros at the bottom.

Since the backward phase cannot be applied, the ref is


just the same as the rref. The non-zero row represents
the equation and (represents the solution to the system
where t is the parameter such that t .
•   system and has augmented matrix
The as shown below. A single
step row operation resulted to the 2nd matrix.

The last row indicates that The system is inconsistent since we


know that . This system has no solution.
In general, a matrix in RREF whose bottom row has zeros on the
left and a non-zero on the last column is inconsistent.
•  
Exercise:
1. Determine whether the matrix is in row echelon form (REF),
reduced row echelon form (RREF), both, neither.
(a) (b) (c)
d) (e) (f)
2. Determine what the augmented matrix represents. Express
the solution in n-tuple form.
•• Exercise
 
3. Suppose the augmented matrix for a linear system in the
unknowns x,y, and z has been reduced by elementary row
operations to the given RREF. Solve the system.
(a) (b) c.)
4. Solve the linear system by (a) Gaussian elimination with back
substitution and (b) Gauss-Jordan elimination.
(b) 2 6(b) -2b+3c = 1
21 3a+6b-3c = -2
6a+6b+3c = 5
•  
ANSWERS
1. a, b, c, d and f are in RREF whereas e in REF.
2. The augmented matrix corresponds to the equation =3, = 1, =0, =5 or
expressing the solution more succinctly as the 4-tuple (3,1,0,5).
3. (a) the equation that corresponds to the last row is 0x + 0y + 0z=1 which is
not satisfied by any values of x,y, and z, the system is inconsistent.
(b) The last row can be omitted since it imposes no restrictions on x,y, and z.
The variables x and y (leading variables) can be expressed in terms of the free
variable z which can be treated as a parameter and assigned an arbitrary
value t. From the augmented matrix, if we let z=t such that t is any real
number, then x=-1-3z; y=2+4z and the solution set is expressed as (-1-3t,
2+4t,t).
(c) We can omit the equations corresponding to the zero rows and express x
in terms of the free variables y and z. The free variables can be assigned
arbitrary values say y = s and z = t thus the solution set is expressed as (4+5s-
t, s, t).
4. (a) , , (b) no solution
Solve Exercise 4 (a and b) using Matlab
• system
A   of linear equations is said to be homogeneous if the
constant terms are all zero
 a x + a12x2+…+a1nxn = 0
11 1
a21x1+ a22x2+…+a2nxn = 0
am1x1+am2x2+…+amnxn= 0

Every homogeneous system of linear equation is consistent


because all such system have == 0. This is called the trivial
solution; if there are other solutions, then they are called
nontrivial solutions.
Because a homogeneous linear system always has the trivial
solution, there are only two possibilities for its solutions:
1. The system has only the trivial solution.
2. The system has infinitely many solutions in addition to the
trivial solution.
• the
In   special case of homogeneous linear system of two
equations in two unknowns
x+y =0
x+y=0
The graphs of the equation are lines through the origin, and the
trivial solution corresponds to the point of intersection at the
origin.
• If a homogeneous linear systems has n unknowns, and if the
reduced row echelon form of its augmented matrix has r
nonzero rows, then the system has n-r free variables.
• If a homogeneous linear system has m equations in n
unknowns, and if m<n, then it must also be true that r<n
which implies that there is at least one free variable and that
the system has infinitely many solutions.
Theorem:
A homogeneous linear system with more unknowns than
equations has infinitely many solutions.
Example: Solve the following homogeneous linear system.
APPLICATIONS
•   the coefficients a,b,c, and d so that the curve shown is the
1.Find
graph of the equation
y= a+ b+ cx+ d.
• The concept of a network appears in a variety of applications.
Loosely stated, a 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, to name a few possibilities.
• In most networks, the branches meet at points,
called nodes or junctions, where the flow divides. For
example, in an electrical network, nodes occur where three or
more wires join, in a traffic network they occur at street
intersections, and in a financial network they occur at banking
centers where incoming money is distributed to individuals or
other institutions.
The accompanying figure shows a network of one-way streets with traffic
flowing in the directions indicated. The flowrates along the streets are
measured as the average number of vehicles per hour.
(a) Set up a linear system whose solution provides the unknown flow rates.
(b) Solve the system for the unknown flow rates.
(c) If the flow along the road from A to B must be reduced for construction,
what is the minimum flow that is required to keep traffic flowing on all
roads?
Solution to traffic problem

Use conservation of traffic at each intersection (node) to construct


system of equation.
inflow=outflow

@D: x2+300=x3+400 Rearranging x2-x3=100


@A: x3+750=x4+250 x3-x4=-500
@C: 100+x1=400+x2 x1-x2=300
@B:200+x4=x1+300 -x1+x4=100
Cont’n. Solution to Traffic

•  
Augmented matrix
R3R1 R1+R4R4

R3R2 R2+R4R4

R3+R4R4
R3: x3-x4=-500 let x4 =t; t then x3= -500+t
R2: x2-x3=100 then x2= 100+x3 or x2=-400+t
R1: x1=300+x2 then x1=3000-400+t or x1=-100+t
Cont’n. solution to traffic
To keep the traffic flowing, keep the flowrates non-negative so
that the minimum flow along road from A to B is 500.
Let t=500 then x4=500
x3= -500+500 =0
x2= -400+500=100
x1=-100+500 = 400
Using Matlab
•• A chemical equation is said to be balanced if for each type of atom
 
in the reaction, the same number of atoms appears on each side of
the arrow.
Example: Balance the chemical equation

HCl + Na3PO4 H3PO4 + NaCl


Let , ,, and be positive integers that balance the equation.
()HCl + ( Na3PO4 ()H3PO4 + ()NaCl
Find the system of equations and the general solution .
Solution to Balancing Equation (Homogeneous Equation)

•  construct the system of equations apply elemental balance


To
that is
no. of moles before= no. of moles after
()HCl + ( Na3PO4 ()H3PO4 + ()NaCl
Ans. = t, = =, =t where t=3
Solution:
H: x1=3x3 or x1-3x3 =0 Augmented matrix
Cl: x1=x4 or x1-x4 =0
Na: 3x2=x4 or 3x2-x4 =0
P: x2=x3 or x2-x3 =0
O: 4x2=4x3 or 4x2-4x3 =0
Cont’n. Solution to Balancing Equation

•-R +R  R
1 2 2

-R4R4; R3R3; R4R2


-R2+R3R3; -R3R3;
R3-R4R4;
From R3: x3-x4 =0 let x4=t ; then x3=
From R2: x2-x3=0 or x2= t
From R1:x1-3x3=0 or x1=t t=3 or x1=3; x2=1; x3=1;x4=3
Leontief Input-Output Models
Wassily Leontief- worked on the economic modeling in which he used matrix
methods to study the relationships between different sectors in the economy.
Input-Output Models in an Economy
• The economy is divided into sectors and their interaction with each other
For example, a simple economy might be divided into three sectors-
manufacturing, agriculture and utilities. A sector will produce certain
outputs but will require inputs from the other sectors and itself. The
agricultural sector may produce wheat as an output but will require
input of farm machinery from the manufacturing sector, electrical
power from the utilities sector, and food from its own sector to feed
its workers.
• The economy becomes a network in which inputs and outputs flow in and
out of the sectors.
• The study in which inputs and outputs flow in and out of economic sectors
is called an input-output analysis.
Leontief Input-Output Models
• Most sectors of an economy will produce outputs, but there may exist
sectors that consume outputs without producing anything themselves
(consumer market).
Open Sectors- sectors that do not produce outputs
Closed Economies-economies with no open sectors
Open Economies- economies with one or more open sectors

Manufacturing Agriculture

Open Sector

Utilities
Leontief Input-Output Models
Consider a simple open economy with one open sector and
three product-producing sectors: manufacturing, agriculture,
and utilities. Assume that inputs and outputs are measured in
dollars and that the inputs required by the productive sectors to
produce one dollar’s worth of output in accordance with the
given.
Input required per Dollar Output

Manufacturing Agriculture Utilities


($) ($) ($)
Provider
Manufacturing 0.50 0.10 0.10
Agriculture 0.20 0.50 0.30
Utilities 0.10 0.30 0.40
Leontief Input-Output Models
•  

Suppressing the table C= .


This is called the consumption matrix or sometimes the technology
matrix for the economy. The column vectors
c1= c2= c3=
in C list the inputs required by the manufacturing, agricultural, and
utilities sectors, respectively to produce $1.00 worth of output.
These are called the consumption vectors of the sectors.
Leontief Input-Output Models
This tells us that to produce $1.00 worth of output the
manufacturing sector needs $0.50 worth of manufacturing
output, $0.20 worth of agricultural output, and $0.10 worth of
utilities output.

Suppose the open sector wants the economy to supply it


manufactured goods, agricultural products, and utilities with
dollar values: d1=$ of manufactured goods
d2=$ of agricultural products
d3=$ of utilities
Leontief Input-Output Model
•   column vector d that has these numbers as successive
The
components is called the outside demand vector. Since the
product producing sectors consume some of their own output,
the dollar value of their output must cover their own needs plus
the outside demand. Suppose the dollar values required to do
this are
x1 dollars of manufactured goods
x2 dollars of agricultural products
x3 dollars of utilities
x1 + x2 + x3= = Cx
Leontief Input Output Model
The column vector x that has these numbers as successive
components is called the production vector.

this is this is the fraction consumed by manufacturing

this is the fraction consumed by agriculture

this is the fraction consumed by utilities


Leontief Input Output Model
The vector Cx is called the intermediate demand vector for the
economy. Once the intermediate demand is met, the portion of
the production that is left to satisfy the outside the demand is
x-Cx. Thus if the outside demand vector is d, then x must satisfy
the equation.
x-Cx=d
This equation means
amount produced – intermediate demand = outside demand
Which can also be expressed as (I-C)x= d.
The matrix (I-C) is called the Leontief matrix and (I-C)x= d is
called the Leontief Equation.
Leontief Problem
•  
Referring to the given data, suppose that the open sector has a
demand for $7900 worth of manufacturing products, $3950
worth of agricultural products and $ 1975 worth of utilities, can
the economy meet this demand? If so find the production
vector x that will meet this demand.
Sol’n.
C= x= d=
Solution to the Leontief Problem
•   the Leontief equation (I-C)x=d
Apply

rref results to
The system is consistent and the economy can satisfy the
demand by producing $27,500 worth of manufacturing, $33,750
worth of agricultural output and $ 24,750 worth of utilities.
Exercises:
•   Balance the chemical equation for the combustion of
1.
propane by first writing the homogeneous system of
equation and find the minimum value of t in the general
solution.
C3H8 + O2 CO2 + H2O
2. The flow of traffic is shown in the figure. Solve the system of
equation for the given variables. Find the traffic flow when x3 = 0
and x5= 10.
References
1. Elementary Linear Algebra with
Supplemental Applications and Wiley Plus Set
11th Ed., Anton
2. http://www.supermath.info/math321.pdf

You might also like