SCHOOL OF ENGINEERING & BUIL ENVIRONMEN Mthemtics An Introduction to Mtrices Definition of Mtri Size of Mtri Rows nd Columns of Mtri Mtri Addition Sclr Multipliction of Mtri Mtri Multipliction 7 rnspose Mtri he Zero Mtri he Identity Mtri he Determinnt nd Inverse of Mtri he Determinnt of Mtri Dr Clum Mcdonld
Mtrices Definition of Mtri A mtri is regulr rry of numbers enclosed inside brckets Emple he following re ll mtrices: (), (b), 7 (c), (d) Algebriclly we denote mtri with cpitl letter, eg A A number occurring in mtri is clled n element Ech element in mtri cn be identified by its row nd column numbers For emple the element in position (, ) is the element in row nd column of the mtri Emple () For the mtri A the element in position (, ) is 7 (b) he element t loction (, ) is Size of Mtri We cn identify the size (dimension) of mtri using number pir in the form r c, where r is the number of rows in the mtri nd c the number of columns A mtri with the sme number of rows s columns is clled squre mtri (for obvious resons) Emple he mtrices in Emple hve the following sizes, (), (b), (c) nd (d)
Rows nd Columns of Mtri Another useful pproch to the structure of mtri is to look t the rows nd columns of the mtri hese re simple nd obvious concepts; but we need to know tht the rows re numbered strting from the top (ie row ) nd the columns re numbered strting from the left hnd side of the mtri (ie column ) nd Row rd Column We cn define ddition nd multipliction between pirs of mtrices s long s they re of pproprite dimensions Mtri Addition Addition is strightforwrd wo mtrices cn be dded if nd only if they re of the sme size; the result is chieved by dding corresponding elements of the mtrices he result of the ddition is mtri of the sme size Emple () 7 7, 7 (b) 7 (c) w y z w w z y w z It is importnt to recognise tht we cn not dd mtrices with different dimensions For emple, we cn not dd mtri to mtri
Sclr Multipliction of Mtri A mtri cn be multiplied by number nd this procedure is referred to s sclr multipliction We perform sclr multipliction by multiplying ech element in the mtri by the number Sclr multipliction should not be confused with mtri multipliction which will be defined lter Emple (), (b) Emple () Simplify, Solution 7 Mtri Multipliction Mtri multipliction cn only be crried out between mtrices which re conformble for mtri multipliction wo mtrices A nd B, with sizes n m nd q p respectively, re conformble for multipliction if nd only if p n ; ie the number of columns of A is the sme s the number of rows of B he result is written AB Note tht mtri multipliction my be defined for AB but not necessrily for BA he result of multiplying n n m mtri nd n q n mtri is n q m mtri (note the outside size symbols give the size of the result) Emple 7 Which of the following mtrices re conformble for mtri multipliction,, C B A? Solution BA, AC, CB nd BB re vlid multiplictions; wheres we cnnot clculte AB, BC, AA or CC
o multiply two mtrices, conformble for mtri multipliction, involves n etension of the dot product procedure described erlier in the section on vectors o form the result of multiplying A (on the left) by B (on the right) (ie to form the product AB) we view A s mtri composed of rows nd B s mtri mde up of columns he entries in the product mtri re determined by forming dot products - following the method described previously o form the (i, j)-th element of AB we form the dot product of row i of mtri A with column j of mtri B Emple Let A nd B he product mtri AB cn be clculted s A hs size nd B hs size Hence, AB will hve size For emple, to obtin the element in position (, ) of the product mtri we tke the dot product of row of A with column of B, ie [ ] his process cn be continued to generte the components of the product mtri ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) (
Emple Let A nd B If possible clculte AB nd BA Solution In this cse we cn clculte both AB nd BA (Why?) he result of both the multiplictions will be mtri (Why?) AB nd BA Note: this is n emple of very importnt result in mtri rithmetic, ie in generl BA AB Emple Evlute the following mtri products: (), (b) b b, (c) y Solution (), (b) b b b b (c) y y Emple As simple emple of n ppliction of mtri multipliction we consider the cse of encoding four digit pin number, before sending it over n open line Given four digit pin number, bcd, we cn record this in mtri s P d c b o encode the PIN we cn multiply the mtri P by nother mtri (known only to sender nd receiver), cll this mtri Q For emple, let Q
Cll the coded mtri C hen, for the PIN:, C QP o decipher the coded PIN messge we use the mtri M hen P M C which represents the originl PIN: We will show how to determine the deciphering mtri M, given the enciphering mtri C, lter in this section 7 rnspose Mtri he mtri obtined from A by interchnging the rows nd the columns of A is clled A trnspose nd is denoted A Emple Consider the mtri A 7 Find A Solution: he mtri Hence, Note tht row of A is column of A is obtined by interchnging rows nd columns of the mtri A A 7 A nd row of A is column of A
he Zero Mtri he zero mtri is mtri for which every element is zero Strictly there re mny zero mtrices one for ech possible size of mtri he Identity Mtri his refers to the identity with respect to mtri multipliction he identity mtri is only defined for squre mtrices: it hs on the min digonl (the digonl strting t top left nd going to bottom right) nd zeros everywhere else he mtri is usully represented by I Emple () he identity mtri is,, (b) he identity mtri is, he Determinnt nd Inverse of Mtri Consider the following rithmetic evlutions One wy of interpreting this lst sttement is tht ny (non-zero) number hs ssocited with it multiplictive inverse, nd tht number times its inverse equls We cn mke n nlogous sttement for squre mtrices tht will prove useful lter on Providing the determinnt (defined below) of squre mtri A is non zero, there eists nother squre mtri (sme size s A) clled the inverse of A nd denoted A ; it hs the property tht A A A A I where I is similrly sized identity mtri In this cse mtri multipliction is commuttive We now look t how to determine inverse mtrices 7
b For generl mtri A the inverse is simply written down using the formul c d d b A det( A) c where det( A) d bc is clled the determinnt of the mtri A We cnnot over-emphsise the importnce of the requirement tht d bc for the eistence b of n inverse of the generl mtri A he determinnt of mtri cn be used to c d determine the eistence, or otherwise, of mtri inverse: by checking tht it is non-zero A mtri with n inverse is clled invertible A mtri with no inverse is sid to be non-invertible or singulr Emple Clculte the determinnt of ech of the following mtrices; hence identify which mtrices re invertible nd for the invertible mtrices clculte the inverse () 7, (b), (c), (d), (e) Solution () Determinnt is zero No inverse (b) Determinnt is Mtri hs n inverse, 7 7 (c) Determinnt is zero No inverse (d) Determinnt is - Mtri hs n inverse (e) Determinnt is Mtri hs n inverse For those mtrices for which n inverse eists you should check tht A A A A I
Emple : Decoding PIN number his emple follows on from Emple, Encoding PIN, which you should revisit before continuing Consider PIN (represented by the mtri P) encoded s mtri C by pre-multiplying P by Q, ie C QP Multiply C by Q to get Q C Q QP IP P Hence, multiplying the ciphered PIN by the inverse of the enciphering mtri Q returns the originl PIN number As long s only the sender nd receiver know the mtri Q it is possible to trnsmit the PIN over n open line Emple (see Emple ) An encoding mtri is known to be Determine the originl PIN Q nd the enciphered PIN is Solution Determining the inverse of the enciphering mtri gives Q Hence the PIN is P Q C which represents the originl PIN: Note tht the mtri we clled M in Emple is ctully Q
he Determinnt of Mtri We now demonstrte how to clculte the determinnt of mtri Define the mtri A o clculte the determinnt we proceed s follows: Epnding by Row : D det(a) det det det Note the sign on the centrl term We do not need to simplify this epression ny further s we lredy know how to clculte the determinnt of mtri Alterntively we cn epnd on the second or third rows Epnding by Row : D det(a) det det det Epnding by Row : D det(a) det det det Note the rry of signs In similr mnner we cn epnd on ny of the columns of A
Emple 7 Clculte the determinnt of the mtri A 7 Solution: Epnding on the first row gives: det(a) D det det 7 det 7 ( ) ( 7 ) ( 7 ) Emple Clculte the determinnt of the mtri M Solution: Epnding on the first row gives: D det det det ( ) ( ) ( ) he vlue of the determinnt of squre mtri cn be used to determine if mtri is invertible: if the determinnt is non-zero the mtri is invertible; otherwise the mtri is NO invertible Hence, the mtri in Emple 7 is not invertible while the mtri in Emple is invertible provided tht we hve Note: When clculting the determinnt of mtri we usully epnd long the row or column contining most zeros in order to minimize the rithmetic So, in Emple we could epnd long row or epnd down column
utoril Eercises () Simplify the following (i) (ii) (iii) (iv) () Simplify the following mtri products (i) (ii) (iii) [ ] (iv) [ ] 7 () Simplify the following nd comment on your nswers (i) (ii) () (i) Which of the following mtrices cn be squred?, M A (ii) In generl, which mtrices cn be squred? Justify your nswer
() (i) Given tht A, find the inverse mtri A nd clculte the mtri products AA nd A A Comment on your results (ii) Given tht A clculte the mtri product M AA () Determine when the following mtri is invertible nd clculte its inverse A k (7) For the mtri A show tht ( A ) A () Evlute the determinnt of ech of the following mtrices (i) (ii) (iii) () Which of the mtrices in Question re invertible? Justify your nswer / / () An encoding mtri is known to be Q nd the enciphered PIN is given / / by C / Determine the originl PIN
Answers () (i) ; (ii), (iii) ; (iv) () (i) ; (ii) ; (iii) (iv) () (i) (ii) he conclusion from this emple is tht mtri multipliction is not commuttive, so tht the order in which mtrices re multiplied is importnt () (i) Only the first mtri cn be squred since it is conformble for multipliction with itself (ii) In generl, to squre mtri of size p m requires multiplying n p m mtri by n p m mtri hese re only conformble for mtri multipliction if p m () (i) A so det(a) which is non-zero nd so the mtri is invertible hen A We hve tht I A A AA Both mtri products give the identity mtri (ii) A so A nd AA M
() k A so k A ) det( his is non-zero provided k nd in this cse the inverse is k k (7) A A A ) ( s required () (i) det det det D (ii) det det det D (iii) det det det D () hey re ll invertible ecept (iii), since only (iii) hs zero determinnt () he encoding mtri Q nd the enciphered pin is / C Recll tht QP C where P is the originl pin nd so C Q P We first find Q hen the pin is / Q C P (We cn check this result since pre-multiplying this pin by the encoding mtri should give the enciphered pin, ie / QP C s required)