Unformatted text preview:

Slide 1What is a matrix?Sizing a matrix“Special” Matrices“Special” MatricesMatrix RankTransposing a MatrixMatrix AdditionMatrix MultiplicationMatrix MultiplicationMatrix MultiplicationReducing Square MatricesReducing Square MatricesReducing Square MatricesReducing Square MatricesMatrix InverseMatrix InverseMatrix InverseSingular MatrixIntro to MatricesDon’t be scared…What is a matrix?A Matrix is just rectangular arrays of itemsA typical matrix is a rectangular array of numbers arranged in rows and columns.3 421 62 33 9344 95 66 1377 38 79 33xA� �� �=� �� �� �Sizing a matrixBy convention matrices are “sized” using the number of rows (m) by number of columns (n).3 421 62 33 9344 95 66 1377 38 79 33xA� �� �=� �� �� �3 37 3 28 4 16 5 9xB� �� �=� �� �� �4 211 414 716 822 3xC� �� �� �=� �� �� �[ ]1 117xD =“Special” MatricesSquare matrix: a square matrix is an mxn matrix in which m = n. Vector: a vector is an mxn matrix where either m OR n = 1 (but not both).3 37 3 28 4 16 5 9xB� �� �=� �� �� �[ ]4 1 1 3129 7 22 1440x xX Y� �� �� �= = -� �-� �� �“Special” MatricesScalar: a scalar is an mxn matrix where BOTH m and n = 1.Zero matrix: an mxn matrix of zeros. Identity Matrix: a square (mxm) matrix with 1s on the diagonal and zeros everywhere else.[ ]1 117xD =3 20 00 0 00 0x� �� �=� �� �� �3 31 0 00 1 00 0 1xI� �� �=� �� �� �Matrix RankMatrix Rank: the rank of a matrix is the maximum number of linearly independent vectors (either row or column) in a matrixFull Rank: A matrix is considered full rank when all vectors are linearly independentTransposing a MatrixMatrix Transpose: is the mxn matrix obtained by interchanging the rows and columns of a matrix (converting it to an nxm matrix)[ ]4 1 1 4129 ' 12 9 4 040x xX X� �� �� �= = -� �-� �� �3 4 4 321 44 7721 62 33 9362 95 3844 95 66 13 '33 66 7977 38 79 3393 13 33x xA A� �� �� �� �� �= =� �� �� �� �� �� �Matrix AdditionMatrices can be added (or subtracted) as long as the 2 matrices are the same sizeSimply add or subtract the corresponding components of each matrix. 2 3 2 31 2 3 5 6 7 7 8 9 3 4 51 2 3 5 6 7 1 5 2 6 3 7 6 8 107 8 9 3 4 5 7 3 8 4 9 5 10 12 141 2 3 5 6 7 1 5 2 6 3 7 4 4 47 8 9 3 4 5 7 3 8 4 9 5 4 4 4x xA BA BA B B AA B� � � �= =� � � �� � � �+ + +� � � � � � � �+ = + = =� � � � � � � �+ + +� � � � � � � �+ = +- - - - - -� � � � � � � �- = - = =� � � � � � � �- - -� � � � � � � �Matrix MultiplicationMultiplying a matrix by a scalar: each element in the matrix is multiplied by the scalar.2 31 11 2 3 and = 5; then 7 8 95*1 5*2 5*3 5 10 155*7 5*8 5*9 35 40 45xxA xxA� �=� �� �� � � �= =� � � �� � � �Matrix MultiplicationMultiplying a matrix by a matrix: the product of matrices A and B (AB) is defined if the number of columns in A equals the number of rows in B.Assuming A has ixj dimensions and B has jxk dimensions, the resulting matrix, C, will have dimensions ixkIn other words, in order to multiply them the inner dimensions must match and the result is the outer dimensions.Each element in C can by computed by: ik j ij jkC A B=SMatrix MultiplicationMultiplying a matrix by a matrix: Matching inner dimensions!!Resulting matrix has outer dimensions!!! ( ) ( ) ( )( ) ( ) ( )( ) ( ) ( )( ) ( ) ( )2 3 3 211 122 3 3 22 221 2211 1 112 1 221 2 122 2 22 3 3 22 25 31 2 3 ' 6 47 8 97 5'1*5 2*6 3*7 381*3 2*4 3*5 267 *5 8*6 9*7 1557*3 8* 4 9*5 9838 26'1x xx xxj jj jj jj jx xxA Bc cA B Cc cc A Bc A Bc A Bc A BA B C� �� �� �= =� �� �� �� �� �� �= =� �� �= = + + == = + + == = + + == = + + == =����55 98� �� �� �Reducing Square MatricesTrace: the sum of the diagonal of a square matrix.3 37 3 28 4 1 6 5 9( ) 7 4 9 20xBtr B� �� �=� �� �� �= + + =Reducing Square MatricesDeterminant: The determinant of a matrix is a scalar representation of matrix; considered the “volume” of the matrix or in the case of a VCV matrix it is the generalized variance. Only square matrices have determinants. Determinants are also useful because they tell us whether or not a matrix can be inverted (next).Not all square matrices can be inverted (must be full rank, non-singular matrix)Reducing Square MatricesDeterminant:[ ]( ) ( )( ) ( )1 11 11 2 1 22 22 22 24 4 * *3 2 3*1 2*5 3 10 75 1xxxC Ca bC C a b b aa bC C= =� �= = -� �� �� �= = - = - =-� �� �Reducing Square MatricesDeterminant:[ ] [ ] [ ][ ] [ ] [ ][ ] [ ] [ ]1 1 12 2 2 2 2 22 2 2 1 1 13 33 3 3 3 3 33 3 33 3 2 2 01 5 1 3 4 52(5*5 1*4) 2( 1*5 1*3) 0( 1*5 5*32(25 5) 2( 5 3) 0( 5 1540 16 0 24xxa b cb c a c a bC a b c C a b cb c a c a ba b cCCCC� �� �= = - +� �� �� �-� �� �= -� �� �� �= - - - - - + - -= - - - - - + - -= - + =Matrix InverseMatrix Inverse: Needed to perform the “division” of 2 square matricesIn scalar terms A/B is the same as A * 1/BWhen we want to divide matrix A by matrix B we simply multiply by A by the inverse of B An inverse matrix is defined as 1 1 1Definednxn nxn nxn nxn nxn nxn nxnA A A I AND A A I- - -���� = =Matrix InverseMatrix Inverse: Needed to perform the “division” of 2 square matricesIn scalar terms A/B is the same as A * 1/BWhen we want to divide matrix A by matrix B we simply multiply by A by the inverse of B An inverse matrix is defined as 1 1 1Definednxn nxn nxn nxn nxn nxn nxnA A A I AND A A I- - -���� = =Matrix InverseMatrix …


View Full Document

CSUN PSY 524 - Intro to Matrices

Download Intro to Matrices
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Intro to Matrices and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Intro to Matrices 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?