W7 Linear Equations
-
Upload
danny-manno -
Category
Documents
-
view
224 -
download
0
Transcript of W7 Linear Equations
-
8/2/2019 W7 Linear Equations
1/36
Centre for Computer Technology
ICT114ICT114Mathematics forMathematics for
ComputingComputing
Week 7Week 7
Linear System of EquationsLinear System of Equations
-
8/2/2019 W7 Linear Equations
2/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
ObjectivesObjectives
Determinant of a MatrixDeterminant of a Matrix
Inverse of a MatrixInverse of a Matrix
Inverse of a Matrix using Gauss JordanInverse of a Matrix using Gauss JordanMethodMethod
Solution of Equations using GaussSolution of Equations using Gauss
Elimination MethodElimination MethodSummarySummary
-
8/2/2019 W7 Linear Equations
3/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Determinant of a MatrixDeterminant of a Matrix
Determinants are mathematical objects
that are very useful in the analysis and
solution of System of Linear EquationsOnly square matrices (no. of rows = no. of
columns) have determinants.
The determinant of a (square) matrix is ascalar.
-
8/2/2019 W7 Linear Equations
4/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Determinant of a MatrixDeterminant of a Matrix
For a 2 X 2 matrix A with elementsFor a 2 X 2 matrix A with elements
the determinant of the matrix isthe determinant of the matrix is
-
8/2/2019 W7 Linear Equations
5/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Determinant of a MatrixDeterminant of a Matrix
For a 3 X 3 matrix (shown below) theFor a 3 X 3 matrix (shown below) the
determinant of the matrix isdeterminant of the matrix is
-
8/2/2019 W7 Linear Equations
6/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Determinant of a MatrixDeterminant of a Matrix
For a k X k matrix, A (expanded by
minors) the determinant of the matrix is
-
8/2/2019 W7 Linear Equations
7/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Some PropertiesSome Properties
det(I) = 1 for any identity matrix I.
det(AB) = det(A) det(B)
det(AT) = det(A) If the determinant of a matrix is 0, it is said
to be singular.
If the determinant is 1, the matrix is said tobe unimodular.
-
8/2/2019 W7 Linear Equations
8/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Inverse of a MatrixInverse of a Matrix
The inverse of aThe inverse of a square matrix Asquare matrix A , is a, is a matrixmatrix
AA-1-1 such thatsuch that
wherewhere I is the identity matrixI is the identity matrix
A square matrix A has an inverse only if it isA square matrix A has an inverse only if it is
nonsingular i.e.nonsingular i.e. det IAI 0.det IAI 0.
-
8/2/2019 W7 Linear Equations
9/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Inverse of a MatrixInverse of a Matrix
For a 2 X 2 matrix, A with elementsFor a 2 X 2 matrix, A with elements
the determinant of the matrix isthe determinant of the matrix is
-
8/2/2019 W7 Linear Equations
10/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Inverse of a MatrixInverse of a Matrix
For a 3 X 3 matrix A,For a 3 X 3 matrix A,
the inverse is given bythe inverse is given by
-
8/2/2019 W7 Linear Equations
11/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Gauss Jordan MethodGauss Jordan Method
One more method to find the Inverse of a matrixOne more method to find the Inverse of a matrixis by using the Gauss Jordan method.is by using the Gauss Jordan method.
For a n X n square matrix A, we consider theFor a n X n square matrix A, we consider the
matrixmatrix
where I is the identity matrixwhere I is the identity matrix
-
8/2/2019 W7 Linear Equations
12/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Gauss Jordan MethodGauss Jordan Method
A series of row operations are performed toA series of row operations are performed to
obtain the matrix in the formobtain the matrix in the form
-
8/2/2019 W7 Linear Equations
13/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Gauss Jordan MethodGauss Jordan Method
The Matrix B is the inverse of AThe Matrix B is the inverse of A
-
8/2/2019 W7 Linear Equations
14/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Example Gauss Jordan MethodExample Gauss Jordan Method
To find the Inverse of the matrix ATo find the Inverse of the matrix A
-
8/2/2019 W7 Linear Equations
15/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
matrix A, augmented by the
3x3 identity matrix. The first
pivot encircled in red
row operations required
for the first pivoting
Next pivot on "3" in the (2,2)
position below, encircled in red
-
8/2/2019 W7 Linear Equations
16/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
the result of performing theprevious operation , so the
pivot (2,2 position) is now "1"
row operations required
for the second pivoting
The result of the second
pivoting is below. We now pivot
on the element in the (3,3)
position, encircled in red below
-
8/2/2019 W7 Linear Equations
17/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
the result of performing the
previous operation, so the
pivot (3,3 position) is now "1"
row operations required
for the third pivoting
The result of the third (and last)
pivoting is below
-
8/2/2019 W7 Linear Equations
18/36
March 20, 2012March 20, 2012http://mathworld.wolfram.comCopyright Box Hill Institute
Therefore the inverse of the matrix ATherefore the inverse of the matrix A-1-1 isis
-
8/2/2019 W7 Linear Equations
19/36
March 20, 2012March 20, 2012http://mathworld.wolfram.comCopyright Box Hill Institute
QuestionQuestion
Find the inverse of the matrixFind the inverse of the matrix
22 -1-1 00A =A = -1-1 22 -1-1
00 -1-1 22
-
8/2/2019 W7 Linear Equations
20/36
March 20, 2012March 20, 2012http://mathworld.wolfram.comCopyright Box Hill Institute
The inverse of the matrix is AThe inverse of the matrix is A-1-1
0.7500 0.5000 0.25000.7500 0.5000 0.25000.5000 1.0000 0.50000.5000 1.0000 0.5000
0.2500 0.5000 0.75000.2500 0.5000 0.7500
-
8/2/2019 W7 Linear Equations
21/36
March 20, 2012March 20, 2012http://mathworld.wolfram.comCopyright Box Hill Institute
Solution of EquationsSolution of Equations
Suppose, we have to solve the equations:Suppose, we have to solve the equations:
2 x + 3 y = 7 .. (1)2 x + 3 y = 7 .. (1)
3 x + 4 y = 10 .. (2)3 x + 4 y = 10 .. (2)
By (1) * 3 .. 6 x + 9 y = 21By (1) * 3 .. 6 x + 9 y = 21
and (2) * 2 .. 6 x + 8 y = 20and (2) * 2 .. 6 x + 8 y = 20
By subtraction, y= 1By subtraction, y= 1
On substitution value of y in (1), x=2On substitution value of y in (1), x=2
-
8/2/2019 W7 Linear Equations
22/36
March 20, 2012March 20, 2012http://mathworld.wolfram.comCopyright Box Hill Institute
Solution of EquationsSolution of EquationsAnother method to solve the equations:Another method to solve the equations:
2 x + 3 y = 7 .. (1)2 x + 3 y = 7 .. (1)
3 x + 4 y = 10 .. (2)3 x + 4 y = 10 .. (2)
Divide (1) by 2 .. 1 x + 1.5 y = 3.5 . (3)Divide (1) by 2 .. 1 x + 1.5 y = 3.5 . (3)Multiply (3) by 3 and subtract from (2)Multiply (3) by 3 and subtract from (2)
0 x - 0.5 y = - 0.5 . (4)0 x - 0.5 y = - 0.5 . (4)
Divide (4) by 0.5 0 x + 1 y = 1 . (6)Divide (4) by 0.5 0 x + 1 y = 1 . (6)
Multiply ((6) by 1.5 and subtract from (3)Multiply ((6) by 1.5 and subtract from (3)
1 x + 0 y = 2 . (5)1 x + 0 y = 2 . (5)
Hence, x=2 and y =1Hence, x=2 and y =1
-
8/2/2019 W7 Linear Equations
23/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
Linear System of EquationsLinear System of Equations
Consider the system of equationsConsider the system of equations
aa1111xx11+a+a1212xx22+a+a1313xx33 = b= b11
aa2121xx11+a+a2222xx22+a+a2323xx33 = b= b22
aa3131xx11+a+a3232xx22+a+a3333xx33 = b= b33
The above can be represented in the formThe above can be represented in the form
of a matrix Ax = bof a matrix Ax = b
-
8/2/2019 W7 Linear Equations
24/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
Linear System of EquationsLinear System of Equations
A x = bA x = b
aa1111 aa1212 aa1313 xx11 bb11aa2121 aa2222 aa2323 xx22 = b= b22
aa3131 aa3232 aa3333 xx33 bb33
The solution of the above system ofThe solution of the above system ofequations isequations is x = Ax = A-1-1bb
-
8/2/2019 W7 Linear Equations
25/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
Gauss Elimination MethodGauss Elimination Method
For a system of equations with k variables theFor a system of equations with k variables the
matrix will be of the formmatrix will be of the form
-
8/2/2019 W7 Linear Equations
26/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
Gauss Elimination MethodGauss Elimination Method
The Augmented Matrix is of the formThe Augmented Matrix is of the form
-
8/2/2019 W7 Linear Equations
27/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
Gauss Elimination MethodGauss Elimination Method
A series of elementary row operations are performed onA series of elementary row operations are performed on
the augmented matrix to obtain a matrix in the formthe augmented matrix to obtain a matrix in the form
Solve the equation of the kSolve the equation of the kthth row for xrow for xkk, then substitute, then substitute
back into the equation of the (k-1)back into the equation of the (k-1)stst row to obtain arow to obtain a
solution for xsolution for xk-1k-1, etc., etc.
-
8/2/2019 W7 Linear Equations
28/36
-
8/2/2019 W7 Linear Equations
29/36
March 20, 2012March 20, 2012
http://mathworld.wolfram.comCopyright Box Hill Institute
Solution of EquationsSolution of Equations
Find the solution to the following set ofFind the solution to the following set of
equationsequations
x + y + 2z = 8x + y + 2z = 8
-1x - 2y + 3z = 1-1x - 2y + 3z = 1
3x - 7y + 4z = 103x - 7y + 4z = 10
-
8/2/2019 W7 Linear Equations
30/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
-
8/2/2019 W7 Linear Equations
31/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
Therefore the solution to the set ofTherefore the solution to the set of
equations isequations is x = 3, y = 1, z = 2x = 3, y = 1, z = 2
-
8/2/2019 W7 Linear Equations
32/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
QuestionQuestion
Find the solution to the system ofFind the solution to the system of
equations using gauss elimination methodequations using gauss elimination method
-3x + 2y - 1z = -1-3x + 2y - 1z = -1
6x 6y + 7z = -76x 6y + 7z = -7
3x 4y + 4z = -63x 4y + 4z = -6
-
8/2/2019 W7 Linear Equations
33/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
The solution of the system of equations isThe solution of the system of equations is
x = 2, y = 2, z = -1x = 2, y = 2, z = -1
-
8/2/2019 W7 Linear Equations
34/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
SummarySummary
For the above matrix,For the above matrix,perform a series of rowperform a series of rowoperations to obtain theoperations to obtain thematrix in the formmatrix in the form
The matrix B is theThe matrix B is theinverse of the matrixinverse of the matrix
-
8/2/2019 W7 Linear Equations
35/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
SummarySummary
A x = bA x = b
aa1111 aa1212 aa1313 xx11 bb11
aa2121 aa2222 aa2323 xx22 = b= b22
aa3131 aa3232 aa3333 xx33 bb33
The solution of the above system ofThe solution of the above system of
equations isequations is x = Ax = A-1-1bb
-
8/2/2019 W7 Linear Equations
36/36
March 20, 2012March 20, 2012 http://mathworld.wolfram.comCopyright Box Hill Institute
ReferencesReferences
Gerald W. Recktenwald, NumericalGerald W. Recktenwald, Numerical
Methods with MATLAB, ImplementationMethods with MATLAB, Implementation
and Application, Prentice Halland Application, Prentice HallSolving Linear Systems of Equations,
Gerald Recktenwald, Portland State
University, Mechanical Engineering
Department, [email protected]
http://mathworld.wolfram.comhttp://mathworld.wolfram.com