Matrix Algebra Introduction Continued Special Matrices If S
Matrix Algebra - Introduction Continued Special Matrices If S scalar, A * S = S * A. A* I = A To convert a scalar, k, to a matrix, multiply scalar by I p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
Comments on Diagonal/Triangular Matrices It is easy to evaluate - clearly x = 4, y = 5 and z = 9 It is quite easy to evaluate: Clearly z = 2 from the 3 rd row. Then, row 2 gives 2 y + 4*2 = 18; But z known, so y = 5. Then, row 1 gives x + 3*5 + 2*2 = 21; x = 2 p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
What if matrix not triangular/diagonal? It turns out that there is a rather useful matrix, such that So pre-multiply both sides of equation by the arbitrary matrix p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
Multiplying out the matrices we get a simplified equation This, of course, is an equation we solved earlier. Thus the solution to the equation is x = 2, y = 5 and z = 2. If pre-multiply one side of eqn, must do same to other side. p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
Application Stochastic Matrix + Markov Process In 1995 30% of graduates become researchers (R), 20% get jobs in commercial sector (C) and 50% join industry (I). Over 5 years this changes according to the following table: each element is the probability of transition. To R I From R 0. 7 0. 1 (e. g. 0. 2 prob of R to I) C 0. 1 This can be put 0. 3 in matrix form, (e. g. 0. 6 prob of stay C) a so-called Stochastic Matrix I 0. 1 0. 8 (NB Rows add up to 1) Let vector for numbers doing jobs in 1995 be p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2 C 0. 2 0. 6 0. 1
Then the job situation in year 2000 is found by: If the same transition matrix applies, the jobs in 2005 are p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
We can find situation back in 1990 Post-multiplying by another ‘magic’ matrix: Hence 200 = 6 R, 140 = 2. 4 R + 3 C 100 = R + C + I p RJM 06/08/02 so so so R = 33. 33 C = (140 -80)/3 = 20 I = 46. 67 EG 1 C 2 Engineering Maths: Matrix Algebra 2
Remember, (A*B)T=BT*AT By transposing the matrices (note order), the equation becomes: This will be used later. Note, to find situation in 1990, equation is And we then premultiply to get p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
Application : 2 D CAD package Draw logic circuits - first define gates, then have circuit with them AND gate: size 100, 100 bottom left corner at 0, 0. On drawing, AND gate is size 25*25 at 25, 25: must transform 0, 0 on gate = 25, 25 on drawing; 0, 100 25, 50; 50, 0 37. 5, 25 p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
This is achieved by scaling and translating each point: scaling x’ = x / 4; y’ = y / 4; translating x’ = x + 25; y’ = y + 25; overall x’ = x / 4 + 25 y’ = y / 4 + 25; In general want: x’ = x * Sx; y’ = y * Sy x’ = x + Dx; y’ = y + Dy In matrix form, point x, y defined by [x y 1] 1 is dummy element: so have square matrices for multiplication. Scaling matrix - to scale x by Sx and y by Sy Translation matrix - to translate in x by Dx and in y by Dy p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
To draw AND gate, transformation matrix scaling*translation Then any point x, y on the AND gate is transformed to x', y', by: For drawing the NOT gate, we need a rotation matrix also Rotation matrix by angle A anticlockwise p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
To draw the NOT gate: scale by 0. 25, rotate by 90 o, translate by 100, 50; thus Then any point x, y on the NOT gate is transformed to x', y', by: Exercise: To draw NAND gate, half size, rotated by 180 O at 50, 100: p RJM 06/08/02 EG 1 C 2 Engineering Maths: Matrix Algebra 2
- Slides: 12