Вы находитесь на странице: 1из 36

Centre for Computer Technology

ICT114 Mathematics for Computing


Week 7

Linear System of Equations

Objectives
Determinant

of a Matrix Inverse of a Matrix Inverse of a Matrix using Gauss Jordan Method Solution of Equations using Gauss Elimination Method Summary
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Determinant of a Matrix
Determinants

are mathematical objects that are very useful in the analysis and solution of System of Linear Equations Only square matrices (no. of rows = no. of columns) have determinants. The determinant of a (square) matrix is a scalar.
March 20, 2012

http://mathworld.wolfram.com Copyright Box Hill Institute

Determinant of a Matrix
For a 2 X 2 matrix A with elements

the determinant of the matrix is

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Determinant of a Matrix
For a 3 X 3 matrix (shown below) the determinant of the matrix is

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Determinant of a Matrix
For a k X k matrix, A (expanded by minors) the determinant of the matrix is

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Some 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 to be unimodular.
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Inverse of a Matrix
The inverse of a square matrix A , is a matrix A-1 such that

where I is the identity matrix A square matrix A has an inverse only if it is nonsingular i.e. det IAI 0.
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Inverse of a Matrix
For a 2 X 2 matrix, A with elements the determinant of the matrix is

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Inverse of a Matrix
For a 3 X 3 matrix A, the inverse is given by

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Jordan Method


One

more method to find the Inverse of a matrix is by using the Gauss Jordan method. For a n X n square matrix A, we consider the matrix

where I is the identity matrix


March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Jordan Method


A series of row operations are performed to obtain the matrix in the form

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Jordan Method


The Matrix B is the inverse of A

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Example Gauss Jordan Method


To find the Inverse of the matrix A

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

matrix A, augmented by the 3x3 identity matrix. The first pivot encircled in red Next pivot on "3" in the (2,2) position below, encircled in red

row operations required for the first pivoting

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

the result of performing the previous 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

March 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

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Therefore the inverse of the matrix A-1 is

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Question
Find the inverse of the matrix 2 -1 0 -1 2 -1 0 -1 2

A=

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

The inverse of the matrix is A-1 0.7500 0.5000 0.2500 0.5000 1.0000 0.5000 0.2500 0.5000 0.7500

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Solution of Equations
Suppose, we have to solve the equations: 2x +3y = 7 .. (1) 3 x + 4 y = 10 .. (2) By (1) * 3 .. 6 x + 9 y = 21 and (2) * 2 .. 6 x + 8 y = 20 By subtraction, y= 1 On substitution value of y in (1), x=2
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Solution of Equations
Another method to solve the equations: 2x +3y = 7 .. (1) 3 x + 4 y = 10 .. (2) Divide (1) by 2 .. 1 x + 1.5 y = 3.5 Multiply (3) by 3 and subtract from (2) 0 x - 0.5 y = - 0.5 . (3) . (4)

Divide (4) by 0.5 0 x + 1 y = 1 . (6) Multiply ((6) by 1.5 and subtract from (3) 1x +0 y=2 . (5) Hence, x=2 and y =1

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Linear System of Equations


Consider the system of equations a11x1+a12x2+a13x3 = b1 a21x1+a22x2+a23x3 = b2 a31x1+a32x2+a33x3 = b3 The above can be represented in the form of a matrix Ax = b
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Linear System of Equations


Ax=b a11 a21 a31 a12 a22 a32 a13 a23 a33 x1 b1 x2 = b2 x3 b3

The solution of the above system of equations is x = A-1b


March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Elimination Method


For a system of equations with k variables the matrix will be of the form

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Elimination Method


The Augmented Matrix is of the form

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Elimination Method


A series of elementary row operations are performed on the augmented matrix to obtain a matrix in the form

Solve the equation of the kth row for xk, then substitute back into the equation of the (k-1)st row to obtain a solution for xk-1, etc.
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Gauss Elimination Method


If a series of elementary row operations are continued on the augmented matrix to obtain a matrix in the form 1 0 0 0 0..0 b1 0 1 0 0 0..0 b2 0 0 1 0 0..0 b3 . 0 0 0 0 0..1 bk b1 is the solution for x1, b2 for x2, bk for xk
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Solution of Equations
Find the solution to the following set of equations x + y + 2z = 8 -1x - 2y + 3z = 1 3x - 7y + 4z = 10

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Therefore the solution to the set of equations is x = 3, y = 1, z = 2


March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Question
Find the solution to the system of equations using gauss elimination method -3x + 2y - 1z = -1 6x 6y + 7z = -7 3x 4y + 4z = -6

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

The solution of the system of equations is x = 2, y = 2, z = -1

March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Summary

For the above matrix, perform a series of row operations to obtain the matrix in the form The matrix B is the inverse of the matrix
http://mathworld.wolfram.comCopyright Box Hill Institute

March 20, 2012

Summary
A

x=b a11 a12 a13 x1 b1 a21 a22 a23 x2 a31 a32 a33 x3 = b2 b3

The solution of the above system of equations is x = A-1b


March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

References
Gerald

W. Recktenwald, Numerical Methods with MATLAB, Implementation and Application, Prentice Hall Solving Linear Systems of Equations, Gerald Recktenwald, Portland State University, Mechanical Engineering Department, gerry@me.pdx.edu http://mathworld.wolfram.com
March 20, 2012

http://mathworld.wolfram.comCopyright Box Hill Institute

Вам также может понравиться