Slide 1 - Matrices Overview
- Matrices are rectangular arrays of numbers, symbols, or expressions.
- Each entry in a matrix is called an element.
- Matrices are denoted by uppercase letters.
- The size of a matrix is given by the number of rows and columns it has.
- For example, a matrix with 3 rows and 4 columns is called a 3x4 matrix.
Slide 2 - Matrices - Elements and Notation
- Each element in a matrix is denoted by the corresponding row and column index.
- The element in the ith row and jth column of a matrix A is denoted by A[i, j].
- For example, in a matrix A = [ [2, 3, 1], [0, -1, 4] ], A[1, 2] = -1.
- Elements of a matrix can be numbers, variables, or expressions.
Slide 3 - Matrices - Types of Matrices
- Square Matrix: A matrix with an equal number of rows and columns.
- Row Matrix: A matrix with only one row.
- Column Matrix: A matrix with only one column.
- Zero Matrix: A matrix in which all the elements are zero.
- Identity Matrix: A square matrix having ones on its main diagonal and zeros elsewhere.
- Diagonal Matrix: A square matrix in which all the non-diagonal elements are zero.
Slide 4 - Matrices - Operations
- Addition of Matrices: For matrices A and B of the same size, add corresponding elements of A and B to get the sum matrix.
- Subtraction of Matrices: Similar to addition, subtract corresponding elements of A and B to obtain the difference matrix.
- Scalar Multiplication: Multiply each element of a matrix by a constant.
- Matrix Multiplication: Multiply a matrix A of size m x n with a matrix B of size n x p to get a matrix C of size m x p.
Slide 5 - Matrix Addition
- To add two matrices A and B, the matrices must have the same dimensions.
- Add corresponding elements of A and B to obtain the sum matrix.
- Example: A = [1, 2, 3] and B = [4, 5, 6], the sum matrix A + B = [5, 7, 9].
Slide 6 - Matrix Subtraction
- To subtract two matrices A and B, the matrices must have the same dimensions.
- Subtract corresponding elements of B from A to obtain the difference matrix.
- Example: A = [7, 3, 2] and B = [2, 1, 4], the difference matrix A - B = [5, 2, -2].
Slide 7 - Scalar Multiplication
- To perform scalar multiplication, multiply each element of the matrix by a constant.
- Example: A = [2, 4, -1] and k = 3. The scalar product kA = [6, 12, -3].
Slide 8 - Matrix Multiplication - Introduction
- Matrix multiplication is not commutative, i.e., AB ≠ BA in general.
- To multiply two matrices A and B, the number of columns in A must be equal to the number of rows in B.
- The resulting matrix will have the same number of rows as A and the same number of columns as B.
- Example: A = [1, 2] and B = [3, 4], the matrix product AB = [11, 16].
Slide 9 - Matrix Multiplication - Example 1
- A = [1, 2, 3]
- B = [4]
- AB = [14 + 21 + 3*0] = [4 + 2 + 0] = [6]
Slide 10 - Matrix Multiplication - Example 2
- A = [1, 2]
[3, 4]
- B = [5, 6]
[7, 8]
- AB = [15 + 27] [16 + 28]
[35 + 47] [36 + 48]
= [19, 22]
[43, 50]
Slide 11 - Matrices: Multiplication of Matrices
- Matrix Multiplication: Multiply a matrix A of size m x n with a matrix B of size n x p to get a matrix C of size m x p.
- The element C[i, j] of the resulting matrix C is obtained by multiplying the ith row of A with the jth column of B and summing the products.
- The formula for matrix multiplication is C[i, j] = A[i, 1]*B[1, j] + A[i, 2]*B[2, j] + … + A[i, n]*B[n, j].
- Example: A = [1, 2] and B = [3, 4], the matrix product AB = [11, 16].
Slide 12 - Multiplication of Matrices - Example 1
- A = [1, 2, 3]
- B = [4, 5, 6]
- C = [7, 8]
- AB = [14 + 27 + 310] [15 + 28 + 311]
[44 + 57 + 610] [45 + 58 + 611]
= [56, 68]
[89, 110]
Slide 13 - Multiplication of Matrices - Example 2
- A = [3, 2]
[-1, 5]
- B = [-2, 4]
[3, -7]
- AB = [3*-2 + 23] [34 + 2*-7]
[-1*-2 + 53] [-14 + 5*-7]
= [0, -10]
[13, -39]
Slide 14 - Multiplication of Matrices - Properties
- Matrix multiplication is associative, i.e., (AB)C = A(BC).
- Matrix multiplication is distributive, i.e., A(B + C) = AB + AC.
- However, matrix multiplication is not commutative, i.e., AB ≠ BA in general.
Slide 15 - Transpose of a Matrix
- The transpose of a matrix A is obtained by interchanging its rows and columns.
- Denoted by A^T.
- Example: A = [1, 2, 3], its transpose A^T = [1]
[2]
[3]
Slide 16 - Properties of Transpose
- (A^T)^T = A
- (A + B)^T = A^T + B^T
- (kA)^T = kA^T
- (AB)^T = B^T * A^T
Slide 17 - Symmetric Matrix
- A square matrix A is symmetric if A = A^T.
- In other words, the element A[i, j] is equal to the element A[j, i] for all i and j.
- Example: A = [1, 4]
[4, 5]
is a symmetric matrix.
Slide 18 - Skew-Symmetric Matrix
- A square matrix A is skew-symmetric if A^T = -A.
- In other words, the element A[i, j] is equal to the negative of the element A[j, i] for all i and j.
- Example: A = [0, -3, 4]
[3, 0, -5]
[-4, 5, 0]
is a skew-symmetric matrix.
Slide 19 - Scalar Multiplication of Matrices
- To perform scalar multiplication of matrices, multiply each element of the matrix by a constant.
- Example: A = [1, 2, 3]
[4, 5, 6]
and k = 2. The scalar product kA = [2, 4, 6]
[8, 10, 12]
Slide 20 - Zero and Identity Matrices
- Zero Matrix: A matrix in which all the elements are zero.
- Identity Matrix: A square matrix having ones on its main diagonal and zeros elsewhere.
- Example:
- Zero Matrix of size 2x3: [0, 0, 0]
[0, 0, 0]
- Identity Matrix of size 3x3: [1, 0, 0]
[0, 1, 0]
[0, 0, 1]
Slide 21 - Matrices - Multiplication of Matrices
- To multiply two matrices A and B, the number of columns in A must be equal to the number of rows in B.
- The resulting matrix will have the same number of rows as A and the same number of columns as B.
- The element C[i, j] of the resulting matrix C is obtained by multiplying the ith row of A with the jth column of B and summing the products.
- The formula for matrix multiplication is C[i, j] = A[i, 1]*B[1, j] + A[i, 2]*B[2, j] + … + A[i, n]*B[n, j].
- Example: A = [1, 2] and B = [3, 4], the matrix product AB can be calculated as follows:
- C[1, 1] = 13 + 24 = 11
- C[1, 2] = 10 + 21 = 2
Slide 22 - Matrix Multiplication - Example
- A = [1, 2, 3]
[4, 5, 6]
- B = [7, 8]
[9, 10]
[11, 12]
- AB = [17 + 29 + 311, 18 + 210 + 312]
[47 + 59 + 611, 48 + 510 + 612]
= [58, 64]
[139, 154]
Slide 23 - Matrix Multiplication - Properties
- Matrix multiplication is associative: (AB)C = A(BC)
- Matrix multiplication is distributive over matrix addition: A(B + C) = AB + AC
- However, matrix multiplication is not commutative: AB ≠ BA in general.
Slide 24 - Matrix Inverse
- A square matrix A has an inverse if A^-1 exists such that A * A^-1 = A^-1 * A = I, where I is the identity matrix.
- Not all matrices have inverses. Only non-singular matrices (determinant ≠ 0) have inverses.
- The inverse of a matrix A can be found using the formula: A^-1 = (1/det(A)) * adj(A), where det(A) is the determinant of A and adj(A) is the adjugate of A.
Slide 25 - Matrix Determinant
- The determinant of a square matrix A is a scalar value denoted by det(A) or |A|.
- The determinant of a 2x2 matrix [a, b]
[c, d] is given by ad - bc.
- The determinant of a 3x3 matrix [a, b, c]
[d, e, f]
[g, h, i] can be calculated using the formula:
det(A) = a(ei - fh) - b(di - fg) + c(dh - eg)
Slide 26 - Matrix Rank
- The rank of a matrix refers to the maximum number of linearly independent rows or columns in the matrix.
- It is denoted by the symbol “rank(A)”.
- The rank of a matrix can be determined by performing row operations to obtain the row echelon form of the matrix and counting the number of non-zero rows.
Slide 27 - Matrix Rank - Example
- A = [1, 2, 3]
[4, 5, 6]
[7, 8, 9]
- Now, perform row operations to obtain the row echelon form:
- R2 = R2 - 4R1
- R3 = R3 - 7R1
- The row echelon form of A becomes:
[1, 2, 3]
[0, -3, -6]
[0, 0, 0]
- The rank of A is 2, as there are 2 non-zero rows.
Slide 28 - Matrix Equations
- Matrix equations are equations in which matrices are involved.
- They can be solved by performing operations to isolate the unknown variable.
- Example: Solve the matrix equation AX = B, where A = [2, 3]
[4, 5]
and B = [7, 8]
[9, 10]
- Multiply both sides of the equation by A^-1 to isolate X: X = A^-1 * B.
Slide 29 - Matrix Equations - Example
- A = [2, 3]
[4, 5]
- A^-1 = (1/(-2 + 12)) * [5, -3]
[-4, 2]
= [1/10, -1/10]
[-2/10, 1/10]
- B = [7, 8]
[9, 10]
- X = A^-1 * B = [1/10 * 7 + (-1/10) * 9, 1/10 * 8 + (-1/10) * 10]
[-2/10 * 7 + 1/10 * 9, -2/10 * 8 + 1/10 * 10]
= [1/10, 0]
[-1/10, 0]
Slide 30 - Summary
- Matrices are rectangular arrays of numbers, symbols, or expressions.
- Matrix operations include addition, subtraction, scalar multiplication, and multiplication.
- Matrix multiplication is not commutative, but it is associative and distributive.
- The transpose of a matrix is obtained by interchanging its rows and columns.
- Square matrices can be symmetric or skew-symmetric.
- Determinants, inverses, and ranks are important properties of matrices.
- Matrix equations can be solved by performing operations on both sides of the equation.