Matrices - Three possibilities

  • A matrix can have three possibilities:
    • Tall matrix
    • Square matrix
    • Wide matrix

Tall Matrix

  • In a tall matrix, the number of rows is greater than the number of columns.
  • Example: | 1 | 2 | 3 | |||| | 4 | 5 | 6 | | 7 | 8 | 9 | | 10 | 11 | 12 |

Square Matrix

  • In a square matrix, the number of rows is equal to the number of columns.
  • Example: | 1 | 2 | 3 | |||| | 4 | 5 | 6 | | 7 | 8 | 9 |

Wide Matrix

  • In a wide matrix, the number of columns is greater than the number of rows.
  • Example: | 1 | 2 | 3 | 4 | ||||| | 5 | 6 | 7 | 8 |

Determinant of a Matrix

  • The determinant of a square matrix can be found using the following formula:
    • For a 2x2 matrix:
      • det(A) = (ad) - (bc)
    • For a 3x3 matrix:
      • det(A) = a(ei - fh) - b(di - fg) + c(dh - ge)

Transpose of a Matrix

  • The transpose of a matrix is obtained by interchanging rows with columns.
  • The transpose of a matrix A is denoted as A^T.
  • Example:
    • A = [ 1 2 ] [ 3 4 ]
    • A^T = [ 1 3 ] [ 2 4 ]

Addition of Matrices

  • Matrices can be added if they have the same dimensions.
  • The sum of matrices is obtained by adding corresponding elements.
  • Example:
    • A = [ 1 2 ] [ 3 4 ]
    • B = [ 5 6 ] [ 7 8 ]
    • A + B = [ 6 8 ] [ 10 12 ]

Scalar Multiplication of a Matrix

  • Scalar multiplication involves multiplying each entry of a matrix by a scalar.
  • Example:
    • A = [ 1 2 ] [ 3 4 ]
    • Scalar: k = 2
    • kA = [ 2 4 ] [ 6 8 ]

Multiplication of Matrices

  • Matrices can be multiplied if the number of columns in the first matrix is equal to the number of rows in the second matrix.
  • The product of matrices is obtained by multiplying corresponding elements and summing them up.
  • Example:
    • A = [ 1 2 ] [ 3 4 ]
    • B = [ 5 6 ] [ 7 8 ]
    • AB = [ 19 22 ] [ 43 50 ]

Inverse of a Matrix

  • The inverse of a square matrix A is denoted as A^-1.
  • If a matrix A has an inverse, it is non-singular or invertible.
  • The inverse matrix satisfies the property: A * A^-1 = I, where I is the identity matrix.
  • Example:
    • A = [ 1 2 ] [ 3 4 ]
    • A^-1 = [ -2 1 ] [ 1.5 -0.5 ]

Cramer’s Rule

  • Cramer’s Rule is used to solve systems of linear equations using determinants.
  • For a system of 2 equations and 2 variables:
    • x = (Dx / D)
    • y = (Dy / D)
  • Example:
    • 2x + y = 8
    • x + 3y = 12
    • Solve using Cramer’s Rule.
  1. Cramer’s Rule
  • Cramer’s Rule is used to solve systems of linear equations using determinants.
  • For a system of 2 equations and 2 variables:
    • x = (Dx / D)
    • y = (Dy / D)
  • Example:
    • Given the system of equations:
      • 2x + y = 8
      • x + 3y = 12
    • To find the values of x and y using Cramer’s Rule, we need to find the determinants Dx and Dy.
  1. Cramer’s Rule: Calculation of Determinants
  • To calculate the determinant Dx, we replace the coefficients of x in the system of equations with the constant terms.
    • 8 + y = 0
    • 12 + 3y = 0
  • Solving these equations, we find Dx = -24.
  1. Cramer’s Rule: Calculation of Determinants (contd.)
  • To calculate the determinant Dy, we replace the coefficients of y in the system of equations with the constant terms.
    • 2x + 8 = 0
    • x + 12 = 0
  • Solving these equations, we find Dy = -4.
  1. Cramer’s Rule: Calculation of Determinants (contd.)
  • To calculate the determinant D, we replace the coefficients of both x and y with the constant terms.
    • 8 + 1y = 0
    • 12 + 3y = 0
  • Solving these equations, we find D = 32.
  1. Cramer’s Rule: Calculation of x and y
  • Using Cramer’s Rule:
    • x = (Dx / D) = -24 / 32 = -3/4
    • y = (Dy / D) = -4 / 32 = -1/8
  • Therefore, the solution to the system of equations is x = -3/4 and y = -1/8.
  1. Matrix Operations Recap
  • Let’s recap the matrix operations we have learned so far:
    • Determinant of a matrix
    • Transpose of a matrix
    • Addition of matrices
    • Scalar multiplication of a matrix
    • Multiplication of matrices
    • Inverse of a matrix
    • Cramer’s Rule
  1. Applications of Matrices
  • Matrices have various applications in the real world:
    • Solving systems of linear equations
    • Computer graphics
    • Game development
    • Data analysis
    • Image processing
    • Markov chains
    • Network theory
  1. Solving Systems of Linear Equations
  • Matrices are useful in solving systems of linear equations efficiently.
  • We can represent the system of equations in matrix form and apply matrix operations to find the solution.
  1. Computer Graphics
  • Matrices are extensively used in computer graphics to represent transformations such as translation, rotation, and scaling.
  • By multiplying matrices, we can easily apply these transformations to objects in a virtual 3D space.
  1. Game Development
  • Matrices are vital in game development for rendering graphics, calculating transformations, and simulating physics.
  • Matrices help in defining the position, orientation, and movement of objects in a game world.
  1. Multiplication of Matrices (Continued)
  • In matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix.
  • Example:
    • A = [ 1 2 3 ] [ 4 5 6 ]
    • B = [ 7 8 ] [ 9 10 ] [ 11 12 ]
    • AB = [ 58 64 ] [ 139 154 ]
  1. Properties of Matrix Multiplication
  • Matrix multiplication has the following properties:
    • Associative: (AB)C = A(BC)
    • Distributive: A(B + C) = AB + AC
    • Not Commutative: AB ≠ BA (in general)
    • Identity Element: AI = IA = A, where I is the identity matrix
  1. Identity Matrix
  • The identity matrix is a square matrix with ones on the main diagonal and zeros elsewhere.
  • The identity matrix is denoted by I.
  • Example:
    • I = [ 1 0 0 ] [ 0 1 0 ] [ 0 0 1 ]
  1. Zero Matrix
  • A zero matrix is a matrix where all elements are zero.
  • The zero matrix is denoted by 0.
  • Example:
    • 0 = [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ]
  1. Diagonal Matrix
  • A diagonal matrix is a square matrix where all elements outside the main diagonal are zero.
  • Example:
    • D = [ a 0 0 ] [ 0 b 0 ] [ 0 0 c ]
  1. Symmetric Matrix
  • A symmetric matrix is a square matrix that is equal to its transpose.
  • Example:
    • S = [ 1 2 3 ] [ 2 4 5 ] [ 3 5 6 ]
    • S = S^T
  1. Skew-Symmetric Matrix
  • A skew-symmetric matrix is a square matrix where the transpose of the matrix is equal to the negation of the matrix itself.
  • Example:
    • K = [ 0 2 -5 ] [ -2 0 -1 ] [ 5 1 0 ]
    • K = -K^T
  1. Orthogonal Matrix
  • An orthogonal matrix is a square matrix whose columns are mutually orthogonal unit vectors (orthonormal vectors).
  • The product of an orthogonal matrix and its transpose is the identity matrix.
  • Example:
    • O = [ 1/sqrt(2) -1/sqrt(2) ] [ 1/sqrt(2) 1/sqrt(2) ]
    • OO^T = I
  1. Application of Matrices - Markov Chains
  • Markov chains are stochastic processes that use matrices to model the probability of transitioning from one state to another.
  • The transition matrix determines the probabilities of moving from one state to another.
  • Markov chains have applications in various fields, such as finance, biology, and computer science.
  1. Application of Matrices - Network Theory
  • Matrices are used in network theory to analyze and model complex networks.
  • Adjacency matrices and incidence matrices are commonly used to represent graphs and networks.
  • Network theory is useful in analyzing social networks, transportation systems, and electrical circuits.