Slide 1: Matrices - System of linear equation

  • A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns.
  • A system of linear equations can be represented using matrices.
  • The augmented matrix is obtained by concatenating the coefficients of the variables with the constants.
  • The coefficient matrix represents the coefficients of the variables only.
  • The matrix equation can be written as AX = B, where A is the coefficient matrix, X is the variable matrix, and B is the constant matrix.

Slide 2: Steps to Solve the System of Linear Equations using Matrices

  1. Write the system of linear equations in the form AX = B.
  1. Identify the coefficient matrix A, variable matrix X, and constant matrix B.
  1. Find the inverse of the coefficient matrix A, if it exists.
  1. Multiply both sides of the equation by the inverse of A.
  1. Simplify the equation to find the solution matrix X.
  1. Check the solution by substituting the values of X into the original equations.

Slide 3: Example 1

Solve the system of linear equations using matrices: ``

2x + 3y - z = 1

3x - 2y + 4z = -2 x - 4y + 3z = 3 Step 1: Write the system of linear equations in the form AX = B.

2 3 -1 x 1

3 -2 4 y -2

1 -4 3 z 3 Step 2: Identify the coefficient matrix A, variable matrix X, and constant matrix B. A = | 2 3 -1 | | 3 -2 4 | | 1 -4 3 | X = | x | | y | | z | B = | 1 | | -2 | | 3 | ``

Slide 4: Example 1 (contd.)

Step 3: Find the inverse of the coefficient matrix A, if it exists. Inverse of A = | 1/23 13/46 3/46 | | 9/46 -5/46 14/46 | | -1/23 -8/46 12/46 | Step 4: Multiply both sides of the equation by the inverse of A. A^-1 * A * X = A^-1 * B X = A^-1 * B Step 5: Simplify the equation to find the solution matrix X. | x | | 1/23 13/46 3/46 | | 1 | | y | = | 9/46 -5/46 14/46 | * | -2 | | z | | -1/23 -8/46 12/46 | | 3 | Simplifying further, we get: x = -0.217 y = 0.652 z = 1.215

Slide 5: Example 1 (contd.)

Step 6: Check the solution by substituting the values of X into the original equations. ``

2*(-0.217) + 3*(0.652) - (-1.215) = 1

3*(-0.217) - 2*(0.652) + 4*(1.215) = -2
(-0.217) - 4*(0.652) + 3*(1.215) = 3
`` The left side of each equation equals the right side, hence the solution is correct.

Slide 6: Gauss Jordan Elimination Method

  • Gauss-Jordan elimination is an algorithm used to solve systems of linear equations.
  • The main goal of this method is to transform the augmented matrix into row-echelon form and then into reduced row-echelon form.
  • The row-echelon form consists of leading 1’s and zeroes below and above them in each row.
  • The reduced row-echelon form is the further reduced form with leading 1’s and zeroes in each row and column.

Slide 7: Gauss Jordan Elimination Method (contd.)

Steps to solve a system of linear equations using Gauss-Jordan elimination method:

  1. Write the augmented matrix of the system of linear equations.
  1. Choose the leftmost non-zero column as the pivot column.
  1. If the pivot element is zero, interchange the row with a non-zero element.
  1. Multiply the pivot row by the reciprocal of the pivot element to make the pivot element equal to 1.
  1. Perform row operations to make all other elements in the pivot column equal to zero.
  1. Repeat steps 2-5 until each pivot element is equal to 1 and all other elements are zero.

Slide 8: Example 2

Solve the system of linear equations using Gauss-Jordan elimination method: ``

2x - 3y + z = 4

3x + 2y - z = -6

5x - y + 2z = 3 Step 1: Write the augmented matrix of the system of linear equations. | 2 -3 1 4 | | 3 2 -1 -6 | | 5 -1 2 3 | ``

Slide 9: Example 2 (contd.)

Step 2: Choose the leftmost non-zero column as the pivot column. The leftmost non-zero column is the first column. Step 3: If the pivot element is zero, interchange the row with a non-zero element. The pivot element is non-zero, so no interchange is needed. Step 4: Multiply the pivot row by the reciprocal of the pivot element to make the pivot element equal to 1. Dividing the first row by 2, we get: | 1 -3/2 1/2 2 | Step 5: Perform row operations to make all other elements in the pivot column equal to zero. Using row operations, we can eliminate the non-zero element above and below the pivot element.

Slide 10: Example 2 (contd.)

After performing row operations, we get: | 1 0 0 1 | | 0 1 0 -2 | | 0 0 1 3 | Simplifying, we get: x = 1 y = -2 z = 3 The solution satisfies all three equations and is called the unique solution.

Slide 11: Types of Matrices

  • Square Matrix: A matrix with an equal number of rows and columns.
  • Row Matrix: A matrix with a single row.
  • Column Matrix: A matrix with a single column.
  • Zero Matrix: A matrix in which all elements are zero.
  • Identity Matrix: A square matrix with ones on the diagonal from the top left to the bottom right, and zeros elsewhere.

Slide 12: Operations on Matrices

  • Addition: Two matrices can be added if they have the same number of rows and columns. The sum is obtained by adding each corresponding element.
  • Subtraction: Two matrices can be subtracted if they have the same number of rows and columns. The difference is obtained by subtracting each corresponding element.
  • Scalar Multiplication: A scalar value (a number) can be multiplied with each element of a matrix.
  • Matrix Multiplication: The multiplication of two matrices is possible if the number of columns in the first matrix is equal to the number of rows in the second matrix.

Slide 13: Properties of Matrices

  • Commutative Property of Addition: A + B = B + A
  • Associative Property of Addition: (A + B) + C = A + (B + C)
  • Associative Property of Scalar Multiplication: k(AB) = (kA)B
  • Distributive Property of Scalar Multiplication: k(A + B) = kA + kB
  • Transpose of a Matrix: Interchanging rows and columns of a matrix to obtain the transpose matrix.
  • Determinant of a Matrix: A scalar value calculated from the elements of a square matrix.

Slide 14: Inverse of a Matrix

  • For a square matrix A, if there exists a matrix B such that AB = BA = I (Identity Matrix), then B is the inverse of A.
  • The inverse of A is denoted as A^(-1).
  • Not all matrices have inverses. A matrix is invertible if and only if its determinant is nonzero.

Slide 15: Example: Addition and Subtraction of Matrices

Consider the matrices: A = | 2 3 | | 1 -2 | B = | -1 4 | | 5 0 | Addition: A + B = | 2 + (-1) 3 + 4 | = | 1 7 | | 1 + 5 -2 + 0 | | 6 -2 | Subtraction: A - B = | 2 - (-1) 3 - 4 | = | 3 -1 | | 1 - 5 -2 - 0 | | -4 -2 |

Slide 16: Example: Scalar Multiplication of a Matrix

Consider the matrix: A = | 1 2 | | 3 4 | Scalar Multiplication: 2A = | 2 * 1 2 * 2 | = | 2 4 | | 2 * 3 2 * 4 | | 6 8 |

Slide 17: Example: Matrix Multiplication

Consider the matrices: A = | 2 3 | | 1 -2 | B = | -1 4 | | 5 0 | Matrix Multiplication: AB = | 2 * -1 + 3 * 5 2 * 4 + 3 * 0 | = | 13 8 | | 1 * -1 - 2 * 5 1 * 4 - 2 * 0 | | -11 4 |

Slide 18: Example: Transpose of a Matrix

Consider the matrix: A = | 2 3 | | 1 -2 | Transpose of A: A^T = | 2 1 | | 3 -2 |

Slide 19: Example: Determinant of a Matrix

Consider the matrix: A = | 2 3 | | 1 -2 | Determinant of A: |A| = (2 * -2) - (3 * 1) = -4 - 3 = -7

Slide 20: Example: Inverse of a Matrix

Consider the matrix: A = | 2 3 | | 1 -2 | To find the inverse of A, we use the formula A^(-1) = (1/|A|) * adj(A), where adj(A) is the adjugate of A. First, find the adjugate of A: adj(A) = | -2 -3 | | -1 2 | Then, find the inverse of A: A^(-1) = (1/|A|) * adj(A) = (-1/7) * | -2 -3 | | -1 2 |

Slide 21: Matrix Operations

  • Matrix Addition:

    • For two matrices A and B of the same size, the sum of A and B is obtained by adding the corresponding elements.
    • Example: A = | 1 2 |, B = | 3 4 | | 5 6 | | 7 8 | A + B = | 1+3 2+4 | = | 4 6 | | 5+7 6+8 | | 12 14 |
  • Matrix Subtraction:

    • For two matrices A and B of the same size, the difference of A and B is obtained by subtracting the corresponding elements.
    • Example: A = | 1 2 |, B = | 3 4 | | 5 6 | | 7 8 | A - B = | 1-3 2-4 | = | -2 -2 | | 5-7 6-8 | | -2 -2 |
  • Scalar Multiplication:

    • A scalar k can be multiplied with a matrix A by multiplying each element of A by k.
    • Example: k = 2, A = | 1 2 | | 3 4 | kA = | 21 22 | = | 2 4 | | 23 24 | | 6 8 |

Slide 22: Matrix Multiplication

  • Matrix multiplication is defined only for matrices where the number of columns in the first matrix is equal to the number of rows in the second matrix.
  • If A is an m x n matrix and B is an n x p matrix, then the product AB is an m x p matrix.
  • Example: A = | 1 2 |, B = | 3 4 | | 3 4 | | 5 6 | AB = |(13)+(25) (14)+(26)| = | 13 16 | |(33)+(45) (34)+(46)| | 29 36 |

Slide 23: Transpose of a Matrix

  • The transpose of a matrix is obtained by interchanging the rows and columns of the original matrix.
  • For a matrix A, the transpose of A is denoted as A^T.
  • Example: A = | 1 2 3 | | 4 5 6 | A^T = | 1 4 | | 2 5 | | 3 6 |

Slide 24: Properties of Transpose

For any matrices A and B, and scalar k, the following properties hold:

  • (A^T)^T = A (Transpose of the transpose is the original matrix)
  • (A + B)^T = A^T + B^T (Transpose of the sum is the sum of the transposes)
  • (kA)^T = k(A^T) (Transpose of the scalar multiple is the scalar multiple of the transpose)
  • (AB)^T = B^T * A^T (Transpose of the product is the product of the transposes in reverse order)

Slide 25: Determinant of a Matrix

  • The determinant of a square matrix is a scalar value calculated from its elements.
  • It is denoted as |A| or det(A).
  • The determinant is only defined for square matrices.
  • Example: A = | 2 3 | | 1 -2 | The determinant of A, |A| = (2 * -2) - (3 * 1) = -4 - 3 = -7

Slide 26: Properties of Determinants

For any square matrices A and B of the same size, and scalar k, the following properties hold:

  • If A and B are row equivalent matrices, then |A| = |B| (Row operations do not change the determinant)
  • |AB| = |A| * |B| (Determinant of the product is the product of the determinants)
  • |kA| = k^n * |A| (Determinant of the scalar multiple is the scalar multiple raised to the power of the matrix size multiplied by the determinant)
  • If A is an invertible matrix, then |A^-1| = 1/|A| (Determinant of the inverse is the reciprocal of the determinant)

Slide 27: Inverse of a Matrix

  • For a square matrix A, if there exists a matrix B such that AB = BA = I (Identity Matrix), then B is the inverse of A.
  • The inverse of A is denoted as A^(-1).
  • Not all matrices have inverses. A matrix is invertible if and only if its determinant is nonzero.
  • Example: A = | 2 3 | | 1 -2 | The inverse of A, A^(-1) = (1/|A|) * adj(A) = (1/-7) * | -2 -3 | | -1 2 | A^(-1) = 1/7 * | 2 3 | |-1 2 |

Slide 28: Properties of Inverse

For any invertible square matrix A and its inverse A^(-1), the following properties hold:

  • (A^(-1))^(-1) = A (Inverse of the inverse is the original matrix)
  • (kA)^(-1) = k^(-1) * A^(-1) (Inverse of the scalar multiple is the reciprocal of the scalar multiplied by the inverse)
  • (AB)^(-1) = B^(-1) * A^(-1) (Inverse of the product is the product of the inverses in reverse order)
  • (A^T)^(-1) = (A^(-1))^T (Inverse of the transpose is the transpose of the inverse)

Slide 29: Solving Systems of Linear Equations using Matrices

  • Matrices can be used to solve systems of linear equations.
  • Given a system of linear equations in the form AX = B, where A is the coefficient matrix, X is the variable matrix, and B is the constant matrix:
    • If A is invertible, the solution is X = A^(-1) * B.
    • If A is not invertible, the system may have no solution or infinitely many solutions.
  • Example: Solve the system of linear equations using matrices: 2x + 3y - z = 1 3x - 2y + 4z = -2 x - 4y + 3z = 3 The solution is x = -0.217, y = 0.652, z = 1.215.