Topic 7: Matrices - p. - CSc (Mccann) Matrlc€s 245 v1.1 1 Why Are We Matrices? Studying plenty Matrices have uses in Computer Science. E.g.: of o Representation... o . graph (see . . of the data structure CSc 345) o ... (see of functions and relations Topics 8 and 9) o Affine transformations in Computer Graphics - CSc - p. Matrices 245 v1.1 (Mccann) 2
Matrix Fundamentals (1 / 3) Definition: Matrix - A l{"\cr,t{Iil\ lA An n d\,Lnn {ns\on 0J! c o t ur.a [tton? [n va \[') rz) NotationT ,[1 tr) [u3 -- (0L h= lt^ ,r[ I I \ i5 \i\ 3xz fn0jT\x - p. - CSc (Mccann) Matrlces 245 v1.1 3 (2 Matrix Fundamentals I 3) Definition: Square Matrices t\0r\ritr,t ]n 6rV\th f fVttnribv of fornrS €9vAl, tr,U tr &f coL'Jrnnt l.\ {\uWD f Matrix Equality Definition: J(^yh-u B N{-( truq sl"r0\t\ th.{ l+ {(4un\ Matrr A-t C4p (,t]'L\,r goir 01 cCI{'Nn on dtrrAA{.n p ol'V}$ lrowA clnrtr __ Q,\t trt'"tMJ 1A {(vAI - CSc - p. l (Mccann) 4 Matricos 245 v1.
(3 Fundamentals / 3) Matrix Definition : Transposition n ftA Ar ,q s,A rY\AJ lnt 1{trnsp0fttrovr r'rr fnxn /rX Of 4K and colurrrJ t\\et iowj f i x Ai )vr rh.t urhnch qfU.n'l'rgAd Definition: Matrix Symmetry q- ie A. 4r ltnox rq fl t^ (qtnflt0"1{i fwur] I\\rMl \'K bq rq v f\rq- rl p=F? uil PTa - p. vl.1 (Mc€ann) 5 l/atrlces- CSc 245 (1 I 5) Matrix Operations 1. Matrix Addition Definition: Matrix Addition o.f *Wo c?5 r4rvl o nn l^na|ri The X n M nnftt-ili C suct,l" X \;tl,v nX Cii -- &i \ tbri e h,tt q ;l $= I fs 3-l = A+R U2) - CSc (Mcoann) - A 6 Matrices 245 v1.1
(2 Matrix I 5) Operations 2. Scalar Product Definition: Scalar qr is ct r@L A rcaf nWnbr 6*41,r",5 Cur,te, ) Definition: Scalar Product " o.fr prq ^ A Ccticif .-l e we trc n^wix nx'/n *lne r/tq[ix E A 11 +l^ql Ib1 3l ff=tt o- +ft= 7 - CSc - p. (Mcoann) 7 Matrlces 245 v1.1 (3 / 5) Matrix Operations 3. Matrix Product (a.k rix Multiplication) Definition: Matrix Product llne pfbCr,tcf nXC'nnfr+r-r,X g,B,n = * cil = 7, - p. vl.1 (Mcoann) f,latrices- CSc 245 I
(4 Matrix Operations I 5) ft= ffi) F)@S n\ AF= 9Lw3o) - CSc - p, l/atrlces 245 v1.1 (Mcoann) I (5 Matrix Operations / 5) -r\ r^ th t/I\l )Y)\yI n C rr'\I lc-^ { : ILFZ oi I-b n \ W 2 urddtnod l-7 -l I Q, I Ir l_k? r) 3xZ - CSc - p. v1.1 (Mcoann) 10 Matrices 245
The ldentity Matrix Remember the concept of Multiplicative ldentity? l.x sK Definition: ldentity Matrix (\X lm \r|l"nf il.1 f\&f \A G,n n x"n 1^'6Uri( c\owq tn\ y\ctrn w I tls d"ruoroncxl Pof.]\o,t{A 0r^d\ t t rtl. ejs rty, 0S -{"\Iruo'vurt L^r {"\Srur.\y\ _ \ \ f \:$ oo I I \{ Ais l't\[n Irn 'A = A'Ip,,- A X w\ Kn W'"\ n hin '{"nX rn tnXn t_I1_i L_t:J_j - CSc - p. vl.1 (Mccann) Matrlces 245 1 1 Matrix Powers 'rlth Definiti an: Matrix Power ' I,n I an t{nxm , { powqn ( ft.e n+b a*T[ n: of I rceuLl+ the I^rloFl-ri1 A An)'[E >r"c\ vd6 0CA oE; iMq+ri/ \Ie | SvcCe G,il ,(A"4) -I '0 t{Y1X Yn 1-wr CWece\Lee - CSc - p. Matrlces 245 vl.1 (Mccann) 12
: Affine (1 Transformations I 3) 'move' graphics. Used to objects in computer , Background: (r, : ) __A 3 (x,r 9,) t$m\oh$n L | -f = X' Y x I I \'\+r$ LjLts tl . stc[r*,\^-. .X 3 X't sx / , / 'q L tz/ " 5"1 u( l , / I (2 Transformations : Affine I 3) Task: 4 4 t,t) scru\( [ tz) *rcmsr6\H \ d A tx:f Sx=SlrZ {q' 3 - p. Matrices- CSc 245 vl.1 (Mccann) l4
(3 : Affine Tiansformations / 3) ttnnr\oiluw Fxo0l tx Sc6rrnol'. ut'?\ [f .t.1 0t L{ lrl ftt il fzo ili loL LO O a[T] \t 'O) )U ly'oxOt frail fql - l \ I f t\,5) - p. CSc 245 v1.1 (Mccann) 15 Matrlces- (1 Zero-One Matrices I 3) Three Operations: 'Join': 1. 'Meet': 2. r\: t\\l N.Llil - CSc - p. 245 vl.1 (Mccann) 1 6 Matrlces
Recommend
More recommend