Topic 7: Matrix and vector algebra Flashcards
(27 cards)
What is a matrix (2)
-A matrix is a rectangular array of numbers which are considered an entity
-Each matrix consists of a series of m rows and n columns
How can we draw a matrix (3)
-Draw a shape with 2 [ ] brackets
-Fill this shape in with elements
-Each Aij is called an element of a matrix, where i = row number, j = column
What is the dimension/order of a matrix (2)
-The dimension/order of a matrix corresponds to its numbers of rows and columns
-a 2x3 matrix has 2 rows, 3 columns
What is the relationship between matrices and vectors (2,1)
-A vector is a matric where m or n = 1
-This is either a column or row vector
-We normally denote matrices with bold upper case letters, and vectors with lower case
What is a null and identity matrix (1,2)
-A null matrix is a matrix where aij = 0 for all i and j
-An identity matrix is a square matric where aij = 0 for all i ≠ j, and aij = 1 for all i = j
-This is the equivalent of multiplying by 1
What is a square and triangular matrix (2)
-A square matrix is one where n = m
-A triangular matrix is a square matrix that has only zeros either above or below the main diagonal (MD is where i = j)
How can we write a system of 3 equations and 3 variables in matrix form (3,3,1)
The 3 equations are:
-a11x1 + a12x2 + a13x3 = b1
-a21x1 + a22x2 + a23x3 = b2
-a31x1 + a32x2 + a33x3 = b3
-Make A a 3x3 matrix, where a11 is row 1 column 1 etc…
-Make x a 3x1 column matrix, with x1 row 1…
-Make b a 3x1 column matrix, with b1 row 1…
(could replace 3 and 3 for m and n)
How do you add matrices (2)
-You add each individual element
-This requires the same dimension from the matrices
How do you compute AB, where A and B are matrices (1,2,1)
-To compute AB, we multiply each row of A with each column of B
-Imagine matrix A, a 2x2 with elements (going TL, TR, BL, BR) a11, a12, a21, a22
-Also imagine matrix B, a 2x2 with elements (going TL, TR, BL, BR) b11, b12, b21, b22
-AB = (going TL, TR, BL, BR) a11b11 + a12b21, a11b12 + a12b22, a21b11 + a22b21, a21b12 + a22b22
How do we know how many rows and columns will be in a matrix which came from multiplying 2 others (2,2)
-Suppose A = [aij]mxn, B = [bij]nxp
-AB = C = [cij]mxp
-To multiply 2 matrices, the number of columns in the first matrix = the number of rows in the second
-The resulting matrix will then have the number of rows in the first and number of columns in the second
What are some rules with matrix multiplication (4)
-AB ≠ BA
-If AB = 0, this doesn’t necessarily mean A, B or BA = 0
-AB = AC doesn’t; necessarily mean B = C
-AB means B is premultiplied by A or A is postmultiplied by B
What is an idempotent matrix (1)
-A square matrix A is said to be an idempotent matrix is A2 = A
What is the transpose of a matrix + example (3)
Let A be an (mxn) matrix
-The tranpose of A corresponds to the (nxm) matrix, whose first column is the first row of A, etc
-This is denoted A’ or AT
-If A = (TL TR BL BR) = [1, 2, -1, -2], A’ = [1, -1, 2, -2]
When is a matrix symmetric (1)
-If it is equal to its transpose
How can we use matrices to solve a system of equations (2)
-Take Ax = b, for a square matrix Anxn, Xnxm, bnxm
-If the inverse of A exists, we can premultiply the equation by A-1 and get x = A-1b
How do we work out the determinant of a 2x2 matrix (1)
-Let A = (TL TR BL BR) [a, b, c, d], Det |A| or |A| = ad-bc
What is the determinant of the 2x2 hessian matrix (2)
-Remember the Hessian Matrix as (TL TR BL BR) [f11’’, f12’’, f21’’, f22’’]
-|H| = f11'’f22’’ - (f21’’)2
How do we work out the determinant of matrices where n≥3, and what is the formula for a 3x3 determinant (2,3)
-When n ≥ 3, we try to break down the determinant of the big matrix into the determinants of smaller matrices
-The determinants of these smaller matrices are called minors
-Consider 3x3 matrix (From TL to TR, ML to MR, BL to BR) [a11 a12 a13, a21 a22 a23, a31 a32 a33
]
-|A| = a11|a22a23, a32a33| - a12|a21a23, a31a33| + a13|a21a22, a31a32|
-Multiply all the elements in one row by the determinants of the 2x2 matrix given if you eliminate that row and column, then remember to alternate between + (TL), - (TM) etc
What is the formula of the determinant to the (nxn) matrix + what is the cofactor (1,2)
- |A| = ai1Ci1 + ai2Ci2 + … + aijCij
-Cij corresponds to the cofactor of the element aij, where you have to delete the ith and jth column.
-Thus, the cofactor Cij corresponds of the minor Mij (determinant of smaller matrix) multiplied by (-1)i+j
What are some rules about the determinant of a matrix (7)
- |A’| = |A|
-If all the elements in a row/column = 0, |A| = 0
-If 2 rows/columns are interchanged, the determinant changes sign but its absolute value remains the same
-If all the elements in a single row/column are multiplied by a, |A| = a|A| - |bA| = bn|A|
- |AB| = |A||B|
- |A+B| isn’t equal to |A| + |B|
What is an inverse matrix (2)
-Let A be an (nxn) matrix
-The inverse matrix A-1 of A is the matrix that solves A(A-1) = A-1(A) = Identity matrix
What is the formula for a 2x2 inverse matrix (2)
-Let A = (TL TR BL BR) [a, b, c, d]
-A-1 = (1/ad-bc)[d, -b, -c, a]
What is the formula for the inverse of a (nxn matrix (1,3)
-Theorem: any square matrix Anxn with determinant |A| ≠ 0 has a unique inverse A-1
-A-1 = (1/|A|)adj(A)
-adj(A) is the adjoint of A corresponding to (C+)’
-(C+)’ is the matrix of cofactors, transposed
How to work out the inverse of a matrix (4)
-Work out the determinant
-Work out the cofactors (get rid of row and column, work out determinant, do + or -)
-Transpose the matrix of the cofactors (Swap rows and columns)
-1/det x this transposed matrix