You are on page 1of 30

Chapter 8

Matrices

Outline
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 Matrix Algebra Systems of Linear Algebraic Equations Rank of a Matrix Determinants Properties of Determinants Inverse of a Matrix Cramers Rule The Eigenvalue Problem Powers of Matrices

Outline (contd.)
8.10 8.11 8.12 8.13 8.14 8.15 8.16 8.17 Orthogonal Matrices Approximation of Eigenvalues Diagonalization LU-Factorization Cryptography An Error-Correcting Code Method of Least Squares Discrete Compartmental Models

Matrix Algebra
A matrix is any rectangular array of numbers or functions a11 a1n
The numbers or functions in the a array are entries or elements a mn m1 An n n matrix is a square matrix of order n

Column and row vectors are n 1 and 1 n a1 matrices


a2 an

( a1

a2 an )

Matrix Algebra (contd.)


Matrix addition: A + B = ( aij + bij )mn Scalar multiplication: kA = ( kaij )mn

Matrix Algebra (contd.)


Matrix multiplication where A is an m p matrix, B is a p n matrix, and AB is the m n matrix
p AB = aik bkj k =1 m n

By the associative law, A ( BC ) = ( AB ) C By the distributive law, A ( B + C ) = AB + AC

Matrix Algebra (contd.)


The transpose of an m n matrix, AT, is the n m matrix
a11 a12 T A = a1n a21 am1 a22 am 2 a2 n amn

Matrix Algebra (contd.)


Special matrices
In a zero matrix, all entries are zeros In a triangular matrix, all entries above or below the main diagonal are zeros (lower triangular or upper triangular) In a diagonal matrix, all entries not on the main diagonal are zeros A scalar matrix is a diagonal matrix where all entries on the main diagonal are equal (if those entries are 1s, it is an identity matrix)

Systems of Linear Algebraic Equations


A system of m linear equations in n variables
a11 x1 + a12 x2 + + a1n xn = b1 a21 x1 + a22 x2 + + a2 n xn = b2 am1 x1 + am 2 x2 + + amn xn = bm

In augmented matrix form


a11 a21 a m1 a12 a22 am 2 a1n a2 n amn b1 b2 bm

Systems of Linear Algebraic Equations (contd.)


A system can be solved with elementary operations (row reduction for matrices)
Multiply an equation/row by a nonzero constant Interchange the positions of equations/rows in the system Add a nonzero multiple of one equation/row to any other equation/row

Systems of Linear Algebraic Equations (contd.)


Gaussian elimination for augmented matrices
Row-reduce the matrix to row-echelon form First nonzero entry in a nonzero row is a 1 In consecutive nonzero rows, the first 1 in the lower row appears to the right of the 1 in the higher row Rows consisting of all zeros are at the bottom In the Gauss-Jordan method, the row operations continue until a column containing a first entry 1 has zeros everywhere else

Rank of a Matrix
The rank of an m n matrix A, rank(A), is the maximum number of linearly independent row vectors (no row vector is a constant multiple of another)

Determinants
Determinant of a 2 2 matrix
a11 A= a21
a11 A = a21 a 31

a12 a22

det = A

a11 a21

a12 = a11a22 a12 a21 a22

Determinant of a 3 3 matrix
a12 a22 a32 a13 a23 a33 a11 det A = a21 a31 a12 a22 a32 a13 a23 a33

= a11a22 a33 + a12 a23 a31 + a13 a21a32 a13 a22 a31 a11a23 a32 a12 a21a33

Properties of Determinants
If AT is the transpose of A, then det AT = det A If any two rows (columns) of A are the same, det A = 0 If all entries in a row (column) of A are zero, then det A = 0 If B is obtained by interchanging any two rows (columns) of A, then det B = det A

Properties of Determinants (contd.)


If B is obtained from A by multiplying a row (column) by a nonzero real number k, then det B = det A If A and B are both n n matrices, det = A det A B If A is an n n triangular matrix, det A = a11a22 ann

Inverse of a Matrix
If A is an n n matrix and there exists an n n matrix B such that AB = BA = I , then A is said to be nonsingular or invertible and B is the inverse of A

Cramers Rule
For a system of n linear equations in n variables
a11 x1 + a12 x2 + + a1n xn = b1 a21 x1 + a22 x2 + + a2 n xn = b2 an1 x1 + an 2 x2 + + ann xn = bn

it is convenient to define a special matrix


a11 a21 Ak = an1 a12 a1k 1 b1 a22 a2 k 1 b2 an 2 ank 1 bn a1k +1 a1n a2 k +1 a2 n ank +1 ann

Cramers Rule (contd.)


If det A 0, the solution of the system is given by
det A1 det A 2 det A n x1 = , x2 = , xn = det A det A det A

where Ak , k = 1, 2, , n is given by the special matrix previously defined

The Eigenvalue Problem


It is often important to determine if there exist nonzero n 1 matrices K such that the product vector AK is a constant multiple of K The problem of solving AK = K for nonzero vectors K is the eigenvalue problem for A The solution vector K is said to be an eigenvector corresponding to the eigenvalue We must have det ( A I ) = 0 to find a nonzero solution for K

The Eigenvalue Problem (contd.)


0 to find a We must have det ( A I ) = nonzero solution for K 0 is the characteristic equation det ( A I ) = of A To find an eigenvector corresponding to an eigenvalue, we solve the system of equations 0 by applying Gauss-Jordan ( A I ) K = elimination to ( A I 0 )

The Eigenvalue Problem (contd.)


= 0 is an eigenvalue of A if and only if A is singular If is an eigenvalue of nonsingular matrix A with eigenvector K, the 1/ is an eigenvalue of A1 with the same K The eigenvalues of an upper triangular, lower triangular, and diagonal matrix are the main diagonal entries

Powers of Matrices
An n n matrix A satisfies its own characteristic equation n 0 is the If ( 1) n + cn1 n1 + + c1A + c0I = characteristic equation of A, then n 0 ( 1) A n + cn1A n1 + + c1A + c0I = Any power Am can be written in terms of I, A, and A2, with the coefficients depending on the value of m
A m = c0 I + c1A + c2 A 2 + + cn 1 An 1

Orthogonal Matrices
An n n matrix A is symmetric if A = A If A is symmetric, the eigenvectors corresponding to distinct eigenvalues are orthogonal An n n nonsingular matrix A is orthogonal if
T

A =A

An n n matrix A is orthogonal if and only if its columns form an orthonormal set

Approximation of Eigenvalues
A dominant eigenvalue has an absolute value greater than that of the remaining eigenvalues The power method can be used to approximate dominant eigenvalues The method of deflation is a modified power method used to find nondominant eigenvalues

Diagonalization
If an n n nonsingular matrix P can be found, so that P 1AP = D is a diagonal matrix, the A can be diagonalized by P If an n n matrix A has n linearly independent eigenvectors, the A is diagonalizable A is diagonalizable if and only if it has n independent eigenvectors A is diagonalizable if it has n distinct eigenvalues

LU-Factorization
If an n n matrix A can be written as A = LU where L and U are lower triangular and upper triangular matrices, A = LU is an LUfactorization (or LU-decomposition) of A Doolittles method may be used to find L and U If an n n matrix A has an LU-factorization, = A det L det U then det

Cryptography
A message is put into an m n matrix M An encoding matrix A is created
A is nonsingular A has only integer entities A1 has only integer entities

The encoded message B is created by multiplying A by M The message is decoded using M = A1B

An Error-Correcting Code
The Hamming (7,4) code is an error-detecting/ correcting code that can detect the presence of a single error in a received message and tell which bit must be corrected Encoding consists of transforming a 4-bit word into a 7-bit code word containing 3 parity check bits Parity check equations and a parity check matrix H are constructed where HCT = 0 R is the received message and the syndrome of R is S = HRT and if S = 0 , and the transmission is correct

Method of Least Squares


Used to find a linear function f (x) that best fits data: ( x1 , y1 ) , ( x2 , y2 ) , , ( xn , yn )
Measure the vertical distances ei ( i = 1, 2, , n) between the data points and f, knowing the best fit of f is when the sum of ei is a minimum, or when the sum of the squares of ei values is a minimum 1 T In terms of matrices, X = ( A A ) AT Y is the least squares solution of the data

Discrete Compartmental Models


Discrete mathematical models of a physical systems conceptually separated into a distinct number of small components between which material is transported May be used to evaluate:
Material mixing States of an ecosystem Bloodstream tracer activity

You might also like