You are on page 1of 29

Theoretical Models in Computing Dr.

Mai Duc Thanh Matrices Determinants The inverse matrix

Theoretical Models in Computing


Dr. Mai Duc Thanh1
1 Department

of Mathematics, International University of Hochiminh City

Lecture 2: Matrices and Determinants

Dr. Mai Duc Thanh

Theoretical Models in Computing

Outline
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Matrices

Dr. Mai Duc Thanh

Theoretical Models in Computing

Outline
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Matrices

Determinants

Dr. Mai Duc Thanh

Theoretical Models in Computing

Outline
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Matrices

Determinants

The inverse matrix

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Example
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

An animal breeder can buy three types of food for pigs. Each case of Brand A contains 25 units of ber, 30 units of protein, and 30 units of fat. Each case of Brand B contains 50 units of ber, 30 units of protein, and 20 units of fat. Each case of Brand C contains 75 units of ber, 30 units of protein, and 20 units of fat. How many cases of each should the breeder mix together to obtain a food that provides 1,200 units of ber, 600 units of protein, and 400 units of fat?

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Example
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Example
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

We have the following table Brand A 25 30 30 x cases Brand B 50 35 25 y cases Brand C 75 40 20 z cases

Fiber Protein Fat

Let x, y , z represent number of cases of Brands A, B, C, respectively Total amount of ber is to be 1,200 units: 25x + 50y + 75z = 1, 200. (1)

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Example
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Total amount of protein is 600: 30x + 35y + 40z = 600. Total amount of fat is 400: 30x + 25y + 20z = 400. Problem: nd x, y , z satisfying the system 25x + 50y + 75z = 1, 200 30x + 35y + 40z = 600 30x + 25y + 20z = 400. (4) (3) (2)

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Example
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

We need some data in the 25 50 A = 30 35 30 25

form 75 1, 200 40 600 . 20 400

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Denition
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Many practical applications of engineering and science, quantitative problems of business and economics, and mathematical models involve data of the form a11 a12 a1n a a22 a2n A = 21 am1 am2 amn

(5)

This array of numbers enclosed by brackets is called an m n matrix with m rows and n columns. The entry aij denotes the element in the ith row and jth column.

Dr. Mai Duc Thanh

Theoretical Models in Computing

Square Matrices, Row and Column Vectors


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

If m = n then A is called a square matrix of order n b1 b2 b=. . . bn If A has only one column (n = 1) then A is called a column vector If A has only one row (m = 1) then A is called a row vector c = (c1 , c2 , ..., cn )

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrices: Principle Diagonal


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

If A is a square matrix of order n, the diagonal containing elements a11 , a22 , ..., ann is called the principle, main or leading diagonal.
n

trace A = a11 + a22 + ...ann =


i=1

aii

A diagonal matrix is a square matrix that has its only non-zero elements along the leading diagonal: a11 0 0 0 0 a22 0 0 0 0 a33 0 0 0 0 ann
Dr. Mai Duc Thanh Theoretical Models in Computing

Identity Matrix, Null Matrix


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

A special case of diagonal matrices: Unit matrix or identity matrix I = In for which a11 = a22 = ... = ann = 1: 1 0 0 0 0 1 0 0 0 0 1 0 In = 0 0 0 1 Zero or null matrix 0 is the matrix with every element zero

Dr. Mai Duc Thanh

Theoretical Models in Computing

Transpose Matrix
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Transposed matrix AT of A by (5) is the matrix with T elements aij = aji : a11 a21 a12 a22 AT = a1n a2n an1 an2 amn

If a square matrix such that AT = A, then aij = aji . So elements are symmetric about main diagonal. If AT = A, then A is called a symmetric matrix If AT = A, then A is called a skew-symmetric or antisymmetric matrix

Dr. Mai Duc Thanh

Theoretical Models in Computing

Basic Operations of Matrices


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

(a) Equality: Two matrices A and B are equal if all their elements are the same A = B aij = bij , 1 i m, 1 j n.

Dr. Mai Duc Thanh

Theoretical Models in Computing

Basic Operations of Matrices


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

(b) Addition: Addition of matrices is straightforward If A = (aij ), B = (bij ), 1 i m, 1 j n, then a11 a12 a21 a22 am1 am2 a1n b11 b12 a2n b21 b22 + amn bm1 bm2 b1n b2n bmn

a11 + b11 a12 + b12 a21 + b21 a22 + b22 A+B = am1 + bm1 am2 + bm2

a1n + b1n a2n + b2n amn + bmn

Dr. Mai Duc Thanh

Theoretical Models in Computing

Basic Operations of Matrices


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

(c) Multiplication by a scalar: Matrix a11 a12 a21 a22 A= am1 am2 then a11 a12 a21 a22 A = am1 am2

A has elements aij : a1n a2n amn

a1n a2n amn

(6)

Dr. Mai Duc Thanh

Theoretical Models in Computing

Basic Operations of Matrices


Theoretical Models in Computing Dr. Mai Duc Thanh

(d) Properties of transform:


Matrices Determinants The inverse matrix

(A + B)T = AT + B T , (e) Basic rules of addition: A+B =B +A (A + B) + C = A + (B + C ) (A + B) = A + B

(AT )T = A

Dr. Mai Duc Thanh

Theoretical Models in Computing

Matrix Multiplication
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

If A is an m p matrix with elements aij and B is a p n matrix with elements bij , then we can dene the product C = AB as the m n matrix with entries
p

cij =
k=1

aik bkj

i = 1, 2, ..., m,

j = 1, 2, ..., n

Dr. Mai Duc Thanh

Theoretical Models in Computing

Example:
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Given A= Find AB, BA. 1 2 1 , 0 3 2

1 3 B = 3 1 , 0 2

Dr. Mai Duc Thanh

Theoretical Models in Computing

Properties of matrix multiplication


Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

A(BC ) = (AB)C (mA)B = A(mB) = mAB (A + B)C = AC + BC , A(B + C ) = AB + AC Im A = AIn = A (AB)T = B T AT

Dr. Mai Duc Thanh

Theoretical Models in Computing

Denition of Determinants
Theoretical Models in Computing Dr. Mai Duc Thanh

Given square matrices a11 a12 , a21 a22 a11 a12 a13 B = a21 a22 a23 a31 a32 a33

A=
Matrices Determinants The inverse matrix

Determinant of A, denoted by det A or |A|, is |A| = a11 a12 = a11 a22 a12 a21 a21 a22

Determinant of 3 3 matrix B is |B| = a11 a22 a23 a a a a a12 21 23 + a13 21 22 a32 a33 a31 a33 a31 a32
Theoretical Models in Computing

Dr. Mai Duc Thanh

Denition of Determinants
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Special case: if A = (a), then det A = a Example: Evaluate the third-order determinant 1 2 1 0 3 2 1 1 0

Dr. Mai Duc Thanh

Theoretical Models in Computing

Determinants: Cofactors
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

If we take a determinant and delete row i and column j, the determinant remaining is called the minor Mij . In general, we take any row (or column) and evaluate an n n determinant |A| as
n

|A| =
j=1

(1)i+j aij Mij

Aij = (1)i+j Mij is called the cofactor of element aij Thus,


n

|A| =
j=1

aij Aij

Dr. Mai Duc Thanh

Theoretical Models in Computing

Properties of determinants
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

(a) If two rows (or two columns) of a determinant are equal, then determinant is zero (b) Multiply a row (or a column) by a scalar: a11 a12 a13 a22 a23 = |A| |B| = a21 a31 a32 a33 (c) Interchanging two rows (or two columns) changes the sign of determinant (d) Adding multiples of rows (or columns) together makes no dierence to the determinant (e) Transpose: |AT | = |A| (f) Product: |AB| = |A||B|
Dr. Mai Duc Thanh Theoretical Models in Computing

Adjoint Matrices
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

The adjoint matrix of a matrix A whose entries are cofactors of A: A11 adj A = A12 A13

is the transpose of the matrix A21 A31 A22 A32 A23 A33

Theorem: A(adjA) = |A|I . Thus, |A||adj A| = |A(adj A)| = ||A|In | = |A|n If |A| = 0, this yields Cauchy theorem: |adjA| = |A|n1 Also adj(AB) = (adjB)(adj)A If |A| = 0, then A is called singular. If |A| = 0, then A is called nonsingular
Dr. Mai Duc Thanh Theoretical Models in Computing

Inverse of a matrix
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Given a square matrix A, if we can construct a matrix B such that AB = BA = I then we say: B is the inverse of A and write B = A1 Since A(adjA) = |A|I , if |A| = 0 then A1 = 1 adjA |A|

If |A| = 0, then A1 does not exist If the inverse A1 exists, then it is unique. Indeed, if AC = CA = I , then C = CI = C (AA1 ) = (CA)A1 = IA1 = A1 Inverse of a product: (AB)1 = B 1 A1
Dr. Mai Duc Thanh Theoretical Models in Computing

Example:
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Let

1 2 2 2 1 2 2 2 1

show that A2 4A 5I = 0 and hence A1 = 1 (A 4I ). 5 Calculate A1 from this result.

Dr. Mai Duc Thanh

Theoretical Models in Computing

Homework Assignment N2
Theoretical Models in Computing Dr. Mai Duc Thanh Matrices Determinants The inverse matrix

Textbook: Glyn James, Modern Engineering Mathematics, Addition-Wesley, 2001. -Pages 279-280: 5, 6, 8, 11, 14, 17 -Pages 294: 20, 21, 22, 23, 26, 27, 30, 31 -Pages 298-299: 34, 35, 36, 37 Deadline: 31st March, 2009

Dr. Mai Duc Thanh

Theoretical Models in Computing

You might also like