6.2 Basics
Matrix algebra often proves useful. We assume you recall how to add, multiply and do basic matrix operations.
Example 6.5 (Matrix addition) Consider the matrices: A=[1112121222]andB=[−14−5032]. Then A+B is A+B=[1+(−1)11+421+(−5)2+012+322+2]=[0151621524].
Example 6.6 (Matrix multiplication) Using the same matrices A and B as above, we cannot find A×B as the sizes do not conform. However, AT×B=[1211122122]×[−14−5032]=[(01×−1)+(02×0)(01×4)+(02×3)(01×−5)+(02×2)(11×−1)+(12×0)(11×4)+(12×3)(11×−5)+(12×2)(21×−1)+(22×0)(21×4)+(22×3)(21×−5)+(22×2)]=[−110−1−1180−31−21150−61].
It is worth remembering that matrix multiplication can only occur between two conformable matrices. That is, consider matrix A of size n×m and matrix B of size m×p. Then we can multiply A×B, producing a (n×m)×(m×p)=n×p matrix, but we cannot multiply B by A.