Matrices
1. Defining Matrices
A matrix is a collection of numbers or elements arranged in
rows and columns, usually represented by a capital letter (e.g.,
A). Each element within a matrix is accessed by its row and
column indices, typically written as a_ij where i is the row
number, and j is the column number. Matrices are used for
linear equations, transformations, data representation, and
various operations in fields like physics, computer graphics,
and machine learning.
For example, a 2x3 matrix A with 2 rows and 3 columns can be
represented as:
A = [a_11 a_12 a_13 ; a_21 a_22 a_23]
2. Types of Matrices
Here are some important types of matrices:
1. Row Matrix: A matrix with only one row.
Example: [4, 5, 6] is a 1x3 matrix.
2. Column Matrix: A matrix with only one column.
Example: [7 ; 8 ; 9] is a 3x1 matrix.
3. Square Matrix: A matrix with the same number of rows and
columns (n x n).
4. Diagonal Matrix: A square matrix where non-diagonal
elements are zero.
5. Scalar Matrix: A diagonal matrix where all diagonal elements
are the same.
6. Identity Matrix: A square matrix where diagonal elements
are 1, and others are 0.
7. Zero Matrix: A matrix where all elements are zero.
8. Triangular Matrix: A square matrix with either upper or
lower triangular elements as zero.
3. Transpose of a Matrix
The transpose of a matrix A, denoted by A^T, is obtained by
interchanging rows and columns. For example:
A = [1 2 3 ; 4 5 6] -> A^T = [1 4 ; 2 5 ; 3 6]
Properties:
- (A^T)^T = A
- (A + B)^T = A^T + B^T
- (kA)^T = kA^T for a scalar k
- (AB)^T = B^T A^T for two matrices A and B.
4. Symmetric and Skew-Symmetric Matrices
1. Symmetric Matrix: A matrix A is symmetric if it equals its
transpose, i.e., A = A^T. In a symmetric matrix, a_ij = a_ji for all i
and j.
Example: A = [1 2 ; 2 3]
2. Skew-Symmetric Matrix: A matrix A is skew-symmetric if
A^T = -A, meaning a_ij = -a_ji for all i and j, and diagonal
elements are zero.
Example: A = [0 -3 ; 3 0].
5. Inverse of a Matrix
The inverse of a matrix A, denoted by A^{-1}, is a matrix such
that A * A^{-1} = I, where I is the identity matrix. For a matrix
to have an inverse, it must be square and non-singular (its
determinant ≠ 0).
The inverse of a 2x2 matrix A = [a b ; c d] is given by:
A^{-1} = (1 / det(A)) * [d -b ; -c a], where det(A) = ad - bc. If
det(A) = 0, the matrix does not have an inverse.
Properties:
- (A^{-1})^{-1} = A
- (AB)^{-1} = B^{-1} A^{-1}
- (A^T)^{-1} = (A^{-1})^T