MATH 304Linear AlgebraLecture 5:Matrix algebra.MatricesDefinition. An m-by-n matrix is a rectangulararray of numbers that has m rows and n columns:a11a12. . . a1na21a22. . . a2n............am1am2. . . amnNotation: A = (aij)1≤i≤n, 1≤j≤mor simply A = (aij)if the dimensions are known.An n-dimensional vector can be represented as a1 × n matrix (row vector) or as an n × 1 matrix(column vector):(x1, x2, . . . , xn)x1x2...xnAn m × n matrix A = (aij) can be regarded as acolumn of n-dimensional row vectors or as a row ofm-dimensional column vectors:A =v1v2...vm, vi= (ai1, ai2, . . . , ain)A = (w1, w2, . . . , wn), wj=a1ja2j...amjVector algebraLet a = (a1, a2, . . . , an) and b = (b1, b2, . . . , bn)be n-dimensional vectors, and r ∈ R be a scalar.Vector sum: a + b = (a1+ b1, a2+ b2, . . . , an+ bn)Scalar multiple: ra = (ra1, ra2, . . . , ran)Zero vector: 0 = (0, 0, . . . , 0)Negative of a vector: −b = (−b1, −b2, . . . , −bn)Vector difference:a − b = a + (−b) = (a1− b1, a2− b2, . . . , an− bn)Given n-dimensional vectors v1, v2, . . . , vkandscalars r1, r2, . . . , rk, the expressionr1v1+ r2v2+ · · · + rkvkis called a linear combination of vectorsv1, v2, . . . , vk.Also, vector addition and scalar multiplication arecalled linear operations.Matrix algebraDefinition. Let A = (aij) and B = (bij) be m×nmatrices. The sum A + B is defined to be the m×nmatrix C = (cij) such thatcij= aij+ bijfor allindices i, j.That is, two matrices with the same dimensions canbe added by adding their corresponding entries.a11a12a21a22a31a32+b11b12b21b22b31b32=a11+ b11a12+ b12a21+ b21a22+ b22a31+ b31a32+ b32Definition. Given an m×n matrix A = (aij) and anumber r, the scalar multiple rA is defined to bethe m×n matrix D = (dij) such thatdij= raijforall indices i, j.That is, to multiply a matrix by a scalar r,one multiplies each entry of the matrix by r.ra11a12a13a21a22a23a31a32a33=ra11ra12ra13ra21ra22ra23ra31ra32ra33The m×n zero matrix (all entries are zeros) isdenoted Omnor simply O.Negative of a matrix: −A is defined as (−1)A.Matrix difference: A − B is defined as A + (−B).As far as the linear operations (addition and scalarmultiplication) are concerned, the m×n matricescan be regarded as mn-dimensional vectors.ExamplesA =3 2 −11 1 1, B =2 0 10 1 1,C =2 00 1, D =1 10 1.A + B =5 2 01 2 2, A − B =1 2 −21 0 0,2C =4 00 2, 3D =3 30 3,2C + 3D =7 30 5, A + D is not defined.Properties of linear operations(A + B) + C = A + (B + C )A + B = B + AA + O = O + A = AA + (−A) = (−A) + A = Or(sA) = (rs)Ar(A + B) = rA + rB(r + s)A = rA + sA1A = A0A = ODot productDefinition. The dot product of n-dimensionalvectors x = (x1, x2, . . . , xn) and y = (y1, y2, . . . , yn)is a scalarx · y = x1y1+ x2y2+ · · · + xnyn=nXk=1xkyk.The dot product is also called the scalar product.Matrix multiplicationThe product of matrices A and B is defined if thenumber of columns in A matches the number ofrows in B.Definition. Let A = (aik) be an m×n matrix andB = (bkj) be an n×p matrix. The product AB isdefined to be the m×p matrix C = (cij) such thatcij=Pnk=1aikbkjfor all indices i, j.That is, matrices are multiplied row by column:∗ ∗ ∗* * *∗ ∗* ∗∗ ∗* ∗∗ ∗ * ∗=∗ ∗ ∗ ∗∗ ∗* ∗A =a11a12. . . a1na21a22. . . a2n............am1am2. . . amn=v1v2...vmB =b11b12. . . b1pb21b22. . . b2p............bn1bn2. . . bnp= (w1, w2, . . . , wp)=⇒ AB =v1·w1v1·w2. . . v1·wpv2·w1v2·w2. . . v2·wp............vm·w1vm·w2. . . vm·wpExamples.(x1, x2, . . . , xn)y1y2...yn= (Pnk=1xkyk),y1y2...yn(x1, x2, . . . , xn) =y1x1y1x2. . . y1xny2x1y2x2. . . y2xn............ynx1ynx2. . . ynxn.Example.1 1 −10 2 10 3 1 1−2 5 6 01 7 4 1=−3 1 3 0−3 17 16 10 3 1 1−2 5 6 01 7 4 11 1 −10 2 1is not definedSystem of linear equations:a11x1+ a12x2+ · · · + a1nxn= b1a21x1+ a22x2+ · · · + a2nxn= b2· · · · · · · · ·am1x1+ am2x2+ · · · + amnxn= bmMatrix representation of the system:a11a12. . . a1na21a22. . . a2n............am1am2. . . amnx1x2...xn=b1b2...bma11x1+ a12x2+ · · · + a1nxn= b1a21x1+ a22x2+ · · · + a2nxn= b2· · · · · · · · ·am1x1+ am2x2+ · · · + amnxn= bm⇐⇒ Ax = b,whereA =a11a12. . . a1na21a22. . . a2n............am1am2. . . amn, x =x1x2...xn, b =b1b2...bm.Properties of matrix multiplication:(AB)C = A(BC ) (associative law)(A + B)C = AC + BC (distributive law #1)C (A + B) = CA + CB (distributive law #2)(rA)B = A(rB) = r (AB)Any of the above identities holds provided thatmatrix sums and products are well defined.If A and B are n×n matrices, then both AB and BAare well defined n×n matrices.However, in general, AB 6= BA.Example. Let A =2 00 1, B =1 10 1.Then AB =2 20 1, BA =2 10 1.If AB does equal BA, we say that the matrices Aand B commute.Problem. Let A and B be arbitrary n×n matrices.Is it true that (A − B)(A + B) = A2− B2?(A − B)(A + B) = (A − B)A + (A − B)B= (AA − BA) + (AB − BB)= A2+ AB − BA − B2Hence (A − B)(A + B) = A2− B2if and only ifA commutes with
View Full Document