You are on page 1of 15

Foundations of Chemical Engineering

ChE 0100, Fall 2011 (2121) Instructor: Robert S. Parker 1241 BEH rparker@pitt.edu

c 2011, R.S. Parker University of Pittsburgh Pittsburgh, PA 15261

p. 1/?

Vectors and Matrices


Vector n-dimensional list of values Matrix m n-dimensional table of values
v= v1 v2 . . . vn = vn1 a 21 a22 . . . a2n A= . . .. . . . . . . . . am1 am2 . . . amn a11 a12 . . . a1n = Amn

p. 2/?

Matrix (Vector) Operations


Dimensions number of rows and columns consistent for addition, multiplication Addition, subtraction, multiplication by scalars OK Examples
A= A+B = 1 2 2 1 1 3 3 1 B= 0 1 1 0 2 1 1 2

A B = AB =

p. 3/?

Matrix Operation Properties


Addition
A+B = B+A A+0 = A A + (B +C) = (A + B) +C A + A = 0

Multiplication order is important AB = BA AB = 0 BA = 0, A = 0, B = 0 (necessarily) AC = AD C = D (necessarily) distributive and associative laws hold

p. 4/?

Transpose
Switches dimensions of vector or matrix
AT = A symmetric v1 a11 (AB)T = BT AT a12 . . . a1n

v=

a21 a22 . . . a2n v2 n1 A= . . .. . . =v . . . . . . . . . am1 am2 . . . amn vn a11 a21 a 12 a22 T T v = v1 v2 . . . vn A = . . . . . . a1n a2n

= Amn . . . am1 . . . am2 ... . . . . . . amn

p. 5/?

Minors, Cofactors, Determinants


Determinant (only for square matrices m = n)
D = det(A) = a11 a12 a21 a22 = a11 a22 a12 a21

Matrix minor - determinant of order (n 1) obtained by deleting row i and column j from a matrix Mi j from A above: M11 (A) = a22 Cofactor: Ci j (A) = (1)i+ j Mi j (A) Higher-order determinants D = det(A33 ) = n ai1Ci1 i=1

p. 6/?

Minors, Cofactors, Determinants


Calculate M22 (A)
4 5 6 A= 7 8 9 1 2 3

What is cofactor C22 (A)?

p. 7/?

Elementary Row Operations


Method for manipulating matrices 3 basic types multiplication of a row by a constant (= 0) addition of a constant multiple (= 0) of one row to another interchange rows Example
1 1 1 1 1r1 + r2 1 1 0 0

p. 8/?

Rank
Maximum number of linearly independent rows (or columns) in a matrix highest dimension square submatrix w/ nonzero determinant Find by maximizing size of lower triangular 0

1 1

2 1 2 0 0 1 2 2 2r1 + r2 1 1 0 1 0 1 2 2 0 1 2 2 r2 + r3 1 1 0 1 0 1 2 2 0 0 0 0

p. 9/?

Matrix Inverse
Method for matrix division Only for exists for square matrices Properties
AA1 = A1 A = I (AC)1 = C1 A1

Relaxed inverse, for nonsquare matrices if m > n (more rows than columns)
A = (AT A)1

p. 10/?

Calculating the Inverse


Cofactor method C11 . . . C1n 1 . 1 = . ... . . A . . det(A) Cn1 . . . Cnn

Row operations method transform [A|I] to [I|A1 ] by row operations Example - nd the inverse of:
1 1 3

1 2 4 A= 1 2 1

p. 11/?

Systems of (Linear) Equations


Given the following system of equations
a11 x1 + a12 x2 + . . . + a1n xn = b1 a21 x1 + a22 x2 + . . . + a2n xn = b2 . . = . . . . am1 x1 + am2 x2 + . . . + amn xn = bm Rewrite as: Amn xn1 = bm1

p. 12/?

Solving Systems of Equations


Inverse Method If A is square: x = A1 b If A is nonsquare (m > n): x = (AT A)1 AT b Gauss Jordan elimination construct augmented matrix: [A|b] perform row operations such that A|b solution is x = b row ops. I|b

p. 13/?

Eigenvalues ()
Solutions to the equation Ax = x equivalent to (A I)x = 0 Calculate by setting det(A I) = 0 and solving for i One eigenvalue for each row in A Find the eigenvalues of A = 4 2 3 1

p. 14/?

MATLAB Is Your Friend


Commands of interest transpose: calculate matrix rank: rank calculate determinant: det calculate inverse: inv calculate eigenvectors: eig see also: help

p. 15/?

You might also like