MEM 255 Introducton to Control Systems Revew: Bascs of Lnear Algebra Harry G. Kwatny Department of Mechancal Engneerng & Mechancs Drexel Unversty
Outlne Vectors Matrces MATLAB Advanced Topcs
Vectors A vector s a one-dmensonal array of scalarelements (real or complex numbers) x1 x 2 column vector: x=, row vector: y = y1 y2 y xn Vectors of equal dmenson can be added (elementwse): x= a+ b x = a + b, = 1,, n 1 2 = Vectors can be multpled by a scalar: x= αa x = αa Vectors can be transposed: x x xn T [ x x x ] 1 2 n [ ] n
Inner Product & Norm The nner product of two n-dmensonal vectors x, y s xy, = xy, n = 1 for column vectors xy, = for row vectors xy, = xy The Eucldean norm or length of a vector x s x = x, x = x n = 1 2 T xy Other norms or length measures are also just useful: n x = x, x = max x 1 = 1 T
Lnear Combnatons of Vectors Suppose α, = 1,, p s a set of scalars and x, = 1,, p s a set of column or row vectors, then we defne a new vector y va the lnear combnaton: for columns y = α x + α x + + α x 1 1 2 2 y1 x1,1 x p,1 = α 1 + + α p yn x x 1 1 2 2 1, n p, n p p A set of p vectors x, = 1,, p s lnearly dependent f there exsts a nontrval set of constants α, = 1,, p such that α x + α x + + α x = 0 otherwse t s lnearly ndependent. p p A set of lnearly ndependent n-dmensonal vectors contans at most n vectors.
Matrces A matrx s a 2-dmensonal (rectangular) array of elements: m rows a11 a12 a1 n am1 amn n columns Sometmes we wrte A= aj The elements are called scalars, they are usually real or complex numbers. A matrx wth one row, m = 1, s called a row matrx or row vector. A matrx wth one column, n = 1, s called a column matrx or column vector.
Algebrac Operatons Equalty - two matrces (of the same sze) AB, are equal, wrtten B, f ther correspondng elements are equal, a = b, for1 m,1 j n j j Matrces of the same sze can be added and subtracted. Matrx A= addton and subtracton are performed element-wse A+ B= C a + b = c A B= C a b = c j j j j j j Any matrx A= aj can be multpled by a scalar α αa= αaj An m n matrx A can be post multpled by an n q matrx to produce an m q matrx C, = = C AB, c a b n j k= 1 k k B
Multplcaton b12 b 22 c 22 = a21 a22 a23 a 24 b23 b24 b12 b c a a a a a b [ ] 22 4 22 = 21 22 23 24 = k= 1 2k k2 b32 b 42
Transpose The transpose of an m n matrx s the n p matrx obtaned by nterchangng rows and columns: a11 am 1 a11 a12 a 1n a12 a m2 T A= A = am 1 am2 amn a1 n a mn T A matrx s symmetrc f A = A The followng rules obtan: ( AB) ( ) T T T = B A T T T A+ B = A + B
Determnant ( ) ( ) The j-th mnor M of a square n n matrx A s the n 1 n -1 submatrx of A obtaned by elmnatng row and column j. The determnant of a square matrx s defned recursvely. The determnant of a j= 1 j ( ) [ a ] 1 1 matrx s det = a. 11 11 The determnant of a n n matrx s defned by the expanson n det A= a γ for any = 1,2,, n j j where γ s the cofactor γ = 1 det M Note : 'for any ' means expand along any row. The same result s obtaned by expandng along any column. + j j j j
Propertes of Determnants multply any sngle row or column of A by scalar α to get A det A= α det A nterchange any two rows or columns of A to get A det A= det A add multple of any row or column to another row or column to get det A= det A T det A = det A, det AB= det Adet B for AC, square A B det det Adet D 0 D = for A nonsngular A B 1 det = det Adet D CA B C D A
Matrx Inverse An dentty matrx of sze n s the square matrx wth n rows and columns: 1 0 0 0 1 I = 0 0 0 1 The adjugate of a square matrx A s defned as the transpose of the matrx of cofactors: T adja = γ j It can be shown that AadjA= det A I ( ) adja If det A 0, we have A = I det A A square matrx A wth det A 0 s called nonsngular, for a nonsngular matrx we can defne the nverse adja = = = det A 1 1 1 A AA I, A A I
Rank Consder an m n matrx A. The number of lnearly ndependent rows of A equals the number of ts lnearly ndependent columns. The rank of A s the number of ts lnearly ndependent rows or columns. ( m n) rank A max, If A s a square matrx of sze n, rank A= n det A 0
MATLAB Basc Operatons + Addton A and B must have the same sze, unless one s a scalar. A scalar can be added to a matrx of any sze. - Subtracton A and B must have the same sze, unless one s a scalar. A scalar can be subtracted from a matrx of any sze. * Matrx multplcaton. For nonscalar A and B, the number of columns of A must equal the number of rows of B. A scalar can multply a matrx of any sze. / Slash or matrx rght dvson. B/A s roughly the same as B*nv(A). More precsely, B/A = (A'\B')'. \ Backslash or matrx left dvson. If A s a square matrx, A\B s roughly the same as nv(a)*b, except t s computed n a dfferent way.
MATLAB Basc Operatons ^ Matrx power. X^p s X to the power p, f p s a scalar. If p s an nteger, the power s computed by repeated squarng. If the nteger s negatve, X s nverted frst. ' Matrx transpose. A' s the lnear algebrac transpose of A. For complex matrces, ths s the complex conjugate transpose..' Array transpose. A.' s the array transpose of A. For complex matrces, ths does not nvolve conjugaton. Note: The slash\backslash operatons are the better than nv to solve lnear equatons.
MATLAB Basc Functons norm rank det trace nv matrx or vector norm matrx rank determnant sum of the dagonal elements matrx nverse
Applcatons of Matrces Matrces are mportant n many applcatons. One of the most mportant s the soluton of sets of smultaneous lnear equatons: a x + a x + a x = b 11 1 22 2 1n n 1 a x + a x + a x = b n1 1 n2 2 nn n 2 =,f det 0 = 1 Ax b A x A b Another applcaton s n the soluton of sets of smultaneous lnear ordnary dfferental equatons, for example, equatons lke () () () my + cy + ky = f t ρv + αy = g t can be put n the form x = Ax+ b t Lq + Cv + By = h t where A s a properly defned square matrx, and xb, are properly defned column vectors. ()
Smlarty Transformatons Sometmes t s useful to solve the equatons n a coordnate system that s dfferent from the orgnal problem formulaton. Any square nonsngular matrx T can be consdered a transformaton matrx. 1 x Tx, x T x () 1 1 () Lnear coordnate transformatons of column vectors are accomplshed va transformatons = = For example, under such a transformaton x = Ax+ b t x = T ATx + T b t Matrces transform under a change of 1 A T AT = Ths s called a smlarty transformaton. coordnates accordng to
Specal Matrces Smlarty transformatons are used to transform matrces nto a varety of specal forms (when possble). Among these are: a11 a 0 ann 0 1 0 0 0 0 1 lower companon: 0 0 0 0 0 1 an1 an2 a nn 0 22 dagonal:, upper trangular: a a a 0 a a 0 0 0 a 11 12 1n 22 2n nn
Advanced Topcs ~ Defer Egenvalues/Egenvectors Functons of Matrces Cayley-Hamlton Theorem Sngular Values
Summary Vectors Basc defntons & operatons lnear dependent\ndependent sets Matrces Defntons Algebrac operatons Determnants, Rank, Inverse Smlarty transformatons & specal matrc forms MATLAB functons