Matrices

Matrices

 **Addition/Subtraction: A+B=C**

o Dimensions: mxn & mxn -> mxn

 First value = number of rows

 Second value = number of columns

o Add/Subtract Corresponding Values

 ** Scalar Multiplication: kA = B **

o Dimensions: constant & mxn -> mxn

o Multiply all values by the constant

 ** Multiplication AB=C **

o Dimensions: mxn & nxp -> mxp

 Inner dimensions must be equal, outer ones determine result dimensions

o Multiply each row of A by each column of B, sum of each product determines cell in result (ex. [1 2] x [1 (imagine this is vertical) 4] = 1x1 + 2x4 = [9])

o Not commutative

 **//Determinant //** math \begin{vmatrix} a & b \\ c & d \end{vmatrix} =a*d - b*c math

o Essentially, multiply across diagonally down, then subtract the product from diagonally up

o Usually only for square matrices

o For 3x3's, add first 2 columns again on the right, then multiply diagonals and add them up to make top and bottom totals

o |A| = determinant of A

 ** Cramer's Rule: AX=B **

o A is a 2x2 matrix with constants, X is a 2x1 with the variables, (tall- remember, 2 rows), [x <span style="font-family: Arial,Arial;">...................................................................................................................................y], B is a 2x1 with constants.

Ex. 2x + y = 3 ......4x - 2y = 5 A has 2, 1, 4, -2 X has x and y B has 3 and 5

o <span style="font-family: Arial,Arial;">Ax (imagine x is in subscript) = A, but the first column is swapped with B

o <span style="font-family: Arial,Arial;">Ay = A, 2nd column swapped with B

o <span style="font-family: Arial,Arial;">x = |Ax| / |A|

o <span style="font-family: Arial,Arial;">y = |Ay| / |A|

o <span style="font-family: Arial,Arial;">If there's a z, make A 3x3 and X & B 3x1, then swap 3rd column for Az

o <span style="font-family: Arial,Arial;">Can be used to solve systems of equations

 <span style="font-family: Arial,Arial;">Take coefficients of x, y, and z; Plug them into A.

 <span style="font-family: Arial,Arial;">Plug in x, y, and z down the X matrix

 <span style="font-family: Arial,Arial;">Plug in what ax + by + cz equals (the constant, or non-variable) down the B matrix

 <span style="font-family: Arial,Arial;">Find the determinants of A, Ax, Ay, and Az

 <span style="font-family: Arial,Arial;">Divide, and you've solved for the variables!

 **//<span style="font-family: Arial,Arial;">Singular Matrix // : Determinant = 0 **

 **//<span style="font-family: Arial,Arial;">Identity Matrix: //** <span style="font-family: Arial,Arial;">[1 0] ... [0 1], and so forth, with just a diagonal of 1's in a matrix of 0's. Interestingly, I think I*A=A.

 ** Inverse: A^(-1) = 1 / |A| x [d -b] ** ...................................... **[-c a]** In other words, (reciprocal of the determinant) * (flipped/rearranged matrix) <span style="font-family: Arial,Arial;">A * X = B is also X = A^-1 * B