L6 matrix operations
Matrix Operations Transposition Addition and Subtraction Multiplication Inversion
The Transpose of a Matrix: A' The transpose of a matrix is a new matrix that is formed by interchanging the rows and columns. The transpose of A is denoted by A' or (AT)
Example of a transpose Thus, If A = A', then A is symmetric
Addition and Subtraction Two matrices may be added (or subtracted) iff they are the same order. Simply add (or subtract) the corresponding elements. So, A + B = C yields
1.2 Operations of matrices Sums of matrices Two matrices of the same order are said to be conformable for addition or subtraction. Two matrices of different orders cannot be added or subtracted, e.g., are NOT conformable for addition or subtraction.
1.2 Operations of matrices Scalar multiplication Let l be any scalar and A = [aij] is an m n matrix. Then lA = [laij] for 1 i m, 1 j n, i.e., each element in A is multiplied by l. Example: . Evaluate 3A. In particular, l = -1, i.e., -A = [-aij]. It’s called the negative of A. Note: A - A = 0 is a zero matrix
Addition and Subtraction (cont.) Where
Addition of Matrices add these add these add these add these add these
Matrix addition is commutative Matrix addition is associative
Matrix Addition Simply add or subtract the corresponding components of each matrix.
Matrix Multiplication To multiply a scalar times a matrix, simply multiply each element of the matrix by the scalar quantity
Matrix Multiplication (cont.) To multiply a matrix times a matrix, we write AB (A times B) This is pre-multiplying B by A, or post-multiplying A by B.
Matrix Multiplication (cont.) In order to multiply matrices, they must be CONFORMABLE that is, the number of columns in A must equal the number of rows in B So, A B = C (m n) (n p) = (m p)
Matrix Multiplication (cont.) (m n) (p n) = cannot be done (1 n) (n 1) = a scalar (1x1)
Scalar Multiplication of Matrices If A is an m × n matrix and s is a scalar, then we let kA denote the matrix obtained by multiplying every element of A by k. This procedure is called scalar multiplication. PROPERTIES OF SCALAR MULTIPLICATION
The m × n zero matrix, denoted 0, is the m × n matrix whose elements are all zeros. 1 × 3 2 × 2
Matrix Multiplication (cont.) Thus where
Matrix Multiplication- an example Thus where
Matrix Multiplication Multiplying a matrix by a scalar: each element in the matrix is multiplied by the scalar.
1.2 Operations of matrices Matrix multiplication Example: , , Evaluate C = AB.
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:
Matrix Multiplication Multiplying a matrix by a matrix: Resulting matrix has outer dimensions!!! Matching inner dimensions!!
Example Multiplications
Properties AB does not necessarily equal BA (BA may even be an impossible operation) For example, A B = C (2 3) (3 2) = (2 2) B A = D (3 2) (2 3) = (3 3)
Properties Matrix multiplication is Associative A(BC) = (AB)C Multiplication and transposition (AB)' = B'A'
PROPERTIES OF MATRIX MULTIPLICATION Is it possible for AB = BA ? ,yes it is possible.
1.2 Operations of matrices Properties Matrices A, B and C are conformable, A(B + C) = AB + AC (A + B)C = AC + BC A(BC) = (AB) C AB BA in general AB = 0 NOT necessarily imply A = 0 or B = 0 AB = AC NOT necessarily imply B = C However
Multiplying a matrix by the identity gives the matrix back again. What is AI? What is IA? identity matrix an n n matrix with ones on the main diagonal and zeros elsewhere
Can we find a matrix to multiply the first matrix by to get the identity? Let A be an n n matrix. If there exists a matrix B such that AB = BA = I then we call this matrix the inverse of A and denote it A-1.
If A has an inverse we say that A is nonsingular If A has an inverse we say that A is nonsingular. If A-1 does not exist we say A is singular. To find the inverse of a matrix we put the matrix A, a line and then the identity matrix. We then perform row operations on matrix A to turn it into the identity. We carry the row operations across and the right hand side will turn into the inverse. To find the inverse of a matrix we put the matrix A, a line and then the identity matrix. We then perform row operations on matrix A to turn it into the identity. We carry the row operations across and the right hand side will turn into the inverse. r2 r1 r2 2r1+r2