Matrices (Math)
Unit 2: Matrices
1. Introduction to Matrices
Definition: A matrix is a rectangular array of numbers organized in rows and columns.
Purpose: Matrices are used to organize information, making it easier to compute and manipulate data, especially in systems of linear equations.
2. Types and Structure of Matrices
Matrix Definition: An m × n matrix has m rows and n columns.
Entries: Denoted by 𝑎𝑖𝑗, where i refers to the row, and j refers to the column.
Types of Matrices
Row Matrix: A matrix with only one row.
Example: A = [2, 6, -1, 5] (1 x 4 matrix)
Column Matrix: A matrix with only one column.
Example: B = [2, 4] (2 x 1 matrix)
Square Matrix: Equal number of rows and columns.
Example: A = | 2 | 5 | -2 | | 3 | 1 | 9 | | 4 | 0 | 5 |
Diagonal Matrix: All non-diagonal entries are zero.
Trace of a Matrix: Sum of diagonal elements, e.g. if A = | 2 | -7 | 9 | | 0 | 3 | 2 | | 8 | 9 | 4 | then Trace(A) = 2 + 3 + 4 = 9.
Null/Zero Matrix: All elements are zero.
Example: O = | 0 | 0 | 0 | | 0 | 0 | 0 |
Scalar Matrix: Diagonal entries are equal, non-diagonal are zero.
Upper/Lower Triangular Matrices: Non-zero entries are either above (upper) or below (lower) the main diagonal.
3. Algebra of Matrices
Operations: Matrices can be added, subtracted, and multiplied (but not divided in the conventional sense).
Matrix Equality: Two matrices are equal if they both have the same dimensions and corresponding entries are equal.
Addition and Subtraction: Possible only if dimensions match; performed by adding/subtracting corresponding entries.
Scalar Multiplication: Each entry is multiplied by the scalar value.
4. Operations on Matrices
Matrix Addition
If A and B are both m x n matrices, then A + B = [a𝑖𝑗 + b𝑖𝑗].
Matrix Multiplication
To multiply A (m x n) by B (n x p), the number of columns in A must equal the number of rows in B.
Inner Product: The multiplication of a row from A with a column from B yields the entry in resultant matrix.
Example of Multiplication
If
A = | 1 | 3 | | -1| 0 |
B = | -1 | 5 | | 2 | 0 | then AB can be computed using inner products of rows and columns.
5. Inverses of Matrices
Definition of Inverse: For matrix A, if there exists a matrix A⁻¹ such that AA⁻¹ = A⁻¹A = I (identity matrix), then A is invertible.
Finding Inverse for 2 x 2 Matrix: A = | a | b | | c | d | A⁻¹ = (1/(ad - bc)) * | d | -b | | -c | a |
6. Determinants
Definition: A determinant provides a scalar value that can infer properties about the matrix (like invertibility).
2 x 2 Determinant:| a | b | | c | d | det(A) = ad - bc.
Existence of Inverse: A square matrix is invertible if its determinant is non-zero.
7. Applications of Matrices
Systems of Linear Equations can be expressed in matrix form as AX = B, where A is the coefficient matrix, X is the variable matrix, and B is the constant matrix.
Use of Cramer's Rule: A method to solve systems of equations using determinants, where determinants indicate the solvability of the system.
Cramer’s Rule: For systems in two variables, the solution can be expressed as follows:
x = (det(Dx) / det(D))
y = (det(Dy) / det(D)) where D is the coefficient matrix.
8. Homework and Practice Problems
Solve the linear equation: x + 2z = 4, and others using inverses of matrices.
Calculate determinants for specific matrices and check invertibility.
Use Cramer's Rule for solving system equations as described in the units.