Matrices - Operation on Matrices - Addition

  • Matrices are rectangular arrangements of numbers in rows and columns.
  • The addition of two matrices can be done if they have the same order.
  • To add two matrices, we add their corresponding elements. Example: Let’s add two matrices A and B: A = [1 2 3] B = [4 5 6] [7 8 9] [10 11 12] We add the corresponding elements: [1 + 4 2 + 5 3 + 6] [7 + 10 8 + 11 9 + 12] Simplifying, we get: [5 7 9] [17 19 21] Equation: If A and B are two matrices of the same order, then the sum C = A + B is given by: c[i][j] = a[i][j] + b[i][j] where c[i][j] represents the (i, j) element of matrix C.

Matrices - Operation on Matrices - Scalar Multiplication

  • Scalar multiplication is the multiplication of a matrix by a single number called a scalar.
  • Each element of the matrix is multiplied by the scalar. Example: Let’s perform scalar multiplication of a matrix A by a scalar c: A = [1 2 3] [4 5 6] Scalar multiplication: cA = [c*1 c*2 c*3] [c*4 c*5 c*6] Equation: If A is a matrix and c is a scalar, then the scalar multiplication of A by c is given by: cA = [c * a[i][j]] where cA represents the resulting matrix, and a[i][j] represents the (i, j) element of matrix A.

Matrices - Operation on Matrices - Subtraction

  • Subtraction of matrices is similar to addition, but instead of adding corresponding elements, we subtract them. Example: Let’s subtract two matrices A and B: A = [1 2 3] B = [4 5 6] [7 8 9] [10 11 12] We subtract the corresponding elements: [1 - 4 2 - 5 3 - 6] [7 - 10 8 - 11 9 - 12] Simplifying, we get: [-3 -3 -3] [-3 -3 -3] Equation: If A and B are two matrices of the same order, then the difference C = A - B is given by: c[i][j] = a[i][j] - b[i][j] where c[i][j] represents the (i, j) element of matrix C.

Matrices - Operation on Matrices - Multiplication by a Scalar

  • Multiplication of a matrix by a scalar is performed by multiplying each element of the matrix by the scalar. Example: Let’s multiply a matrix A by a scalar c: A = [1 2 3] [4 5 6] Multiplication by scalar: cA = [c*1 c*2 c*3] [c*4 c*5 c*6] Equation: If A is a matrix and c is a scalar, then the result of the multiplication of A by c is given by: cA = [c * a[i][j]] where cA represents the resulting matrix, and a[i][j] represents the (i, j) element of matrix A.

Matrices - Operation on Matrices - Transpose

  • The transpose of a matrix is obtained by interchanging its rows with columns.
  • The transpose of a matrix A is denoted by A^T. Example: Let’s find the transpose of a matrix A: A = [1 2 3] [4 5 6] Transpose: A^T = [1 4] [2 5] [3 6] Equation: If A is a matrix and B is its transpose, then the element of B at (i, j) is equal to the element of A at (j, i), i.e., b[i][j] = a[j][i] where b[i][j] represents the (i, j) element of matrix B, and a[j][i] represents the (j, i) element of matrix A.

Matrices - Operation on Matrices - Product of Two Matrices

  • The product of two matrices A and B is defined if the number of columns in A is equal to the number of rows in B.

  • The product of matrices is obtained by multiplying corresponding elements and adding the products. Example: Let’s find the product of two matrices A and B: `` A = [1 2] [3 4] [5 6]

    B = [7 8 9] [10 11 12] Product: AB = [17 + 210 18 + 211 19 + 212] [37 + 410 38 + 411 39 + 412] [57 + 610 58 + 611 59 + 612] Simplifying, we get: AB = [27 30 33] [61 68 75] [95 106 117] Equation: If A is an m × n matrix and B is an n × p matrix, then the product C = AB is given by: c[i][k] = Σ(a[i][j] * b[j][k]) `` where c[i][k] represents the (i, k) element of matrix C, and Σ denotes the summation from j = 1 to n.

  1. Matrices - Operation on Matrices - Addition
  • Matrices are rectangular arrangements of numbers in rows and columns.
  • The addition of two matrices can be done if they have the same order.
  • To add two matrices, we add their corresponding elements.
  • Example: Let’s add two matrices A and B: A = [1 2 3] [4 5 6] B = [7 8 9] [10 11 12] We add the corresponding elements: [1 + 7 2 + 8 3 + 9] [4 + 10 5 + 11 6 + 12] Simplifying, we get: [8 10 12] [14 16 18]
  • Equation: If A and B are two matrices of the same order, then the sum C = A + B is given by: c[i][j] = a[i][j] + b[i][j]
  1. Matrices - Operation on Matrices - Scalar Multiplication
  • Scalar multiplication is the multiplication of a matrix by a single number called a scalar.
  • Each element of the matrix is multiplied by the scalar.
  • Example: Let’s perform scalar multiplication of a matrix A by a scalar c: A = [1 2 3] [4 5 6] Scalar multiplication: cA = [c1 c2 c3] [c4 c5 c6]
  • Equation: If A is a matrix and c is a scalar, then the scalar multiplication of A by c is given by: cA = [c * a[i][j]]
  1. Matrices - Operation on Matrices - Subtraction
  • Subtraction of matrices is similar to addition, but instead of adding corresponding elements, we subtract them.
  • Example: Let’s subtract two matrices A and B: A = [1 2 3] [4 5 6] B = [7 8 9] [10 11 12] We subtract the corresponding elements: [1 - 7 2 - 8 3 - 9] [4 - 10 5 - 11 6 - 12] Simplifying, we get: [-6 -6 -6] [-6 -6 -6]
  • Equation: If A and B are two matrices of the same order, then the difference C = A - B is given by: c[i][j] = a[i][j] - b[i][j]
  1. Matrices - Operation on Matrices - Multiplication by a Scalar
  • Multiplication of a matrix by a scalar is performed by multiplying each element of the matrix by the scalar.
  • Example: Let’s multiply a matrix A by a scalar c: A = [1 2 3] [4 5 6] Multiplication by scalar: cA = [c1 c2 c3] [c4 c5 c6]
  • Equation: If A is a matrix and c is a scalar, then the result of the multiplication of A by c is given by: cA = [c * a[i][j]]
  1. Matrices - Operation on Matrices - Transpose
  • The transpose of a matrix is obtained by interchanging its rows with columns.
  • The transpose of a matrix A is denoted by A^T.
  • Example: Let’s find the transpose of a matrix A: A = [1 2 3] [4 5 6] Transpose: A^T = [1 4] [2 5] [3 6]
  • Equation: If A is a matrix and B is its transpose, then the element of B at (i, j) is equal to the element of A at (j, i), i.e., b[i][j] = a[j][i]
  1. Matrices - Operation on Matrices - Product of Two Matrices
  • The product of two matrices A and B is defined if the number of columns in A is equal to the number of rows in B.
  • The product of matrices is obtained by multiplying corresponding elements and adding the products.
  • Example: Let’s find the product of two matrices A and B: A = [1 2] [3 4] [5 6] B = [7 8 9] [10 11 12] Product: AB = [17 + 210 18 + 211 19 + 212] [37 + 410 38 + 411 39 + 412] [57 + 610 58 + 611 59 + 612] Simplifying, we get: AB = [27 30 33] [61 68 75] [95 106 117]
  • Equation: If A is an m × n matrix and B is an n × p matrix, then the product C = AB is given by: c[i][k] = Σ(a[i][j] * b[j][k])
  1. Matrices - Operation on Matrices - Determinant of a Matrix
  • The determinant of a square matrix is a scalar value that is derived from its elements.
  • The determinant provides important information about the matrix.
  • The determinant of a 2x2 matrix is given by: |A| = ad - bc where a, b, c, and d are the elements of the matrix.
  • The determinant of a 3x3 matrix can be calculated using a formula, known as the Sarrus’ Rule.
  • Example: A = [1 2 3] [4 5 6] [7 8 9] The determinant of A can be calculated as follows: |A| = 1*(59 - 68) - 2*(49 - 67) + 3*(48 - 57) = 1*(45 - 48) - 2*(36 - 42) + 3*(32 - 35) = 1*(-3) - 2*(-6) + 3*(-3) = -3 + 12 - 9 = 0
  • The determinant of a matrix helps determine if it is invertible or singular.
  1. Matrices - Operation on Matrices - Inverse of a Matrix
  • The inverse of a square matrix is another matrix that, when multiplied with the original matrix, results in the identity matrix.
  • The inverse of a matrix A is denoted as A^(-1).
  • Not all matrices have an inverse. Only square matrices with non-zero determinants have inverses.
  • The inverse of a 2x2 matrix can be calculated using a formula: A^(-1) = (1/|A|) * [d -b] [-c a] where A is the original matrix and |A| is its determinant.
  • The inverse of a 3x3 matrix can be calculated using the adjugate: A^(-1) = (1/|A|) * adj(A) where A is the original matrix, |A| is its determinant, and adj(A) is the adjugate matrix of A.
  • Example: A = [1 2] [3 4] The inverse of A can be calculated as follows: |A| = (14) - (23) = 4 - 6 = -2 A^(-1) = (1/-2) * [4 -2] [-3 1] = [-2/(-2) 1/(-2)] [3/(-2) -1/(-2)] = [-2 1] [3/2 -1/2]
  1. Matrices - Operation on Matrices - Rank of a Matrix
  • The rank of a matrix refers to the maximum number of linearly independent rows or columns in the matrix.
  • The rank is an important property of a matrix and gives insights into its dimension and properties.
  • The rank of a matrix can be determined by performing row operations to convert it into echelon or reduced echelon form.
  • The rank of a matrix can also be calculated as the maximum number of non-zero rows in its echelon form.
  • The rank of a matrix is always less than or equal to the smaller of the number of rows and columns in the matrix.
  • Example: A = [1 2 3] [4 5 6] [7 8 9] By performing row operations, we can obtain the echelon form: [1 2 3] [0 -3 -6] [0 0 0] The rank of matrix A is 2, since there are 2 non-zero rows.
  1. Matrices - Operation on Matrices - Cramer’s Rule
  • Cramer’s Rule is a method used to solve a system of linear equations using determinants.
  • It provides a formula to determine the values of variables in the system of equations.
  • Cramer’s Rule involves calculating the determinants of matrices formed from the coefficients of variables in the system.
  • For a system of equations with n variables, Cramer’s Rule can be written as: Xi = |D(i)| / |D| where Xi is the value of the i-th variable, |D(i)| is the determinant of the matrix formed by replacing the i-th column of coefficients with the constant terms, and |D| is the determinant of the matrix formed by the coefficients of variables.
  • Example: Consider the system of equations: 2x + 3y = 8 4x - 5y = 7 Using Cramer’s Rule, we can calculate the values of x and y as follows: |D| = |2 3| = 2*(-5) - 34 = -10 - 12 = -22 |4 -5| |D(x)| = |8 3| = 8(-5) - 37 = -40 - 21 = -61 |7 -5| |D(y)| = |2 8| = 27 - 8*4 = 14 - 32 = -18 |4 7| Then, we can calculate x and y: x = |D(x)| / |D| = -61 / -22 = 2.77 (approx.) y = |D(y)| / |D| = -18 / -22 = 0.82 (approx.)
  1. Matrices - Operation on Matrices - Gaussian Elimination
  • Gaussian Elimination is a method used to solve a system of linear equations by performing a sequence of row operations to convert the augmented matrix into reduced row-echelon form.
  • It involves three types of row operations: interchange of two rows, multiplication of a row by a non-zero scalar, and addition of a multiple of one row to another row.
  • The process involves using the row operations to eliminate variables and create zeros in certain positions.
  • Once the augmented matrix is in reduced row-echelon form, the values of the variables can be easily obtained.
  • Example: Consider the system of equations: 2x + 3y - z = 4 x - y + 2z = -1 3x + 4y - 3z = 7 By performing row operations, we can obtain the reduced row-echelon form: [1 0 0|x] <- x = 1 [0 1 0|y]