Matrices and Determinants

Matrices and Algebra of Matrices

Welcome to the fascinating world of matrices! In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. Matrices are fundamental tools in various fields, including linear algebra, physics, engineering, economics, and computer graphics. Understanding matrices and their algebraic operations is crucial for solving systems of linear equations and for representing linear transformations.

What is a Matrix?

A matrix is typically denoted by a capital letter, such as A, B, or C. The elements within the matrix are enclosed in square brackets `[]` or parentheses `()`.

For example, a matrix A can be represented as:
A = $$ \begin{bmatrix} a_{11} & a_{12} & a_{13} & \dots & a_{1n} \\ a_{21} & a_{22} & a_{23} & \dots & a_{2n} \\ a_{31} & a_{32} & a_{33} & \dots & a_{3n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & a_{m3} & \dots & a_{mn} \end{bmatrix} $$

In this representation, $a_{ij}$ denotes the element in the $i$-th row and $j$-th column. The number of rows is denoted by 'm', and the number of columns is denoted by 'n'. The order or dimension of the matrix is given as m x n (read as 'm by n').

Types of Matrices

Matrices can be classified based on their order, the nature of their elements, or specific structural properties.

Based on Order:

  • Row Matrix: A matrix with only one row (m=1). The order is 1 x n. Example: [1 2 3]
  • Column Matrix: A matrix with only one column (n=1). The order is m x 1. Example: $$ \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} $$
  • Square Matrix: A matrix where the number of rows equals the number of columns (m=n). The order is n x n. Example: $$ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} $$
  • Rectangular Matrix: A matrix where the number of rows is not equal to the number of columns (m ≠ n).

Based on Elements:

  • Zero Matrix (Null Matrix): A matrix where all elements are zero. It is denoted by $O_{m \times n}$. Example: $$ \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} $$
  • Diagonal Matrix: A square matrix where all non-diagonal elements are zero. Example: $$ \begin{bmatrix} 2 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 9 \end{bmatrix} $$
  • Scalar Matrix: A diagonal matrix where all diagonal elements are equal. Example: $$ \begin{bmatrix} k & 0 & 0 \\ 0 & k & 0 \\ 0 & 0 & k \end{bmatrix} $$
  • Identity Matrix (Unit Matrix): A scalar matrix where the diagonal elements are all 1. It is denoted by $I_n$ for an n x n matrix. Example: $$ I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} $$

Based on Structure:

  • Upper Triangular Matrix: A square matrix where all elements below the main diagonal are zero. Example: $$ \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 0 & 6 \end{bmatrix} $$
  • Lower Triangular Matrix: A square matrix where all elements above the main diagonal are zero. Example: $$ \begin{bmatrix} 1 & 0 & 0 \\ 2 & 3 & 0 \\ 4 & 5 & 6 \end{bmatrix} $$

Equality of Matrices

Two matrices A and B are said to be equal if they have the same order and their corresponding elements are equal. That is, if $A = [a_{ij}]_{m \times n}$ and $B = [b_{ij}]_{m \times n}$, then A = B if and only if $a_{ij} = b_{ij}$ for all i and j.

Example: If $$ A = \begin{bmatrix} 2 & 3 \\ 4 & 5 \end{bmatrix} \quad \text{and} \quad B = \begin{bmatrix} 2 & 3 \\ 4 & 5 \end{bmatrix} $$ then A = B.

If $$ A = \begin{bmatrix} 2 & 3 \\ 4 & 5 \end{bmatrix} \quad \text{and} \quad C = \begin{bmatrix} 2 & 3 \\ 4 & 6 \end{bmatrix} $$ then A ≠ C because their corresponding elements in the second row, second column are different (5 ≠ 6). Also, if two matrices have different orders, they cannot be equal.

Algebra of Matrices

Matrices can be subjected to various algebraic operations, similar to numbers. The main operations are addition, subtraction, and scalar multiplication. Matrix multiplication is also a key operation, but it has specific rules.

1. Addition of Matrices

The addition of two matrices is defined only if they have the same order. The sum of two matrices A and B, denoted by A + B, is a matrix where each element is the sum of the corresponding elements of A and B. If $A = [a_{ij}]_{m \times n}$ and $B = [b_{ij}]_{m \times n}$, then $A + B = [a_{ij} + b_{ij}]_{m \times n}$.

Example: Let $$ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \quad \text{and} \quad B = \begin{bmatrix} 7 & 8 & 9 \\ 10 & 11 & 12 \end{bmatrix} $$ Both matrices are of order 2 x 3. $$ A + B = \begin{bmatrix} 1+7 & 2+8 & 3+9 \\ 4+10 & 5+11 & 6+12 \end{bmatrix} = \begin{bmatrix} 8 & 10 & 12 \\ 14 & 16 & 18 \end{bmatrix} $$

Properties of Matrix Addition:

  • Commutative Law: A + B = B + A (provided A and B have the same order).
  • Associative Law: (A + B) + C = A + (B + C) (provided A, B, and C have the same order).
  • Existence of Additive Identity: For any m x n matrix A, there exists a zero matrix $O_{m \times n}$ such that A + $O_{m \times n}$ = A.
  • Existence of Additive Inverse: For every m x n matrix A, there exists a matrix -A such that A + (-A) = $O_{m \times n}$. The matrix -A is obtained by multiplying each element of A by -1.

2. Subtraction of Matrices

The subtraction of two matrices is defined only if they have the same order. The difference of two matrices A and B, denoted by A - B, is obtained by subtracting the elements of B from the corresponding elements of A. If $A = [a_{ij}]_{m \times n}$ and $B = [b_{ij}]_{m \times n}$, then $A - B = [a_{ij} - b_{ij}]_{m \times n}$. Alternatively, A - B can be seen as A + (-B).

Example: Using the matrices A and B from the addition example: $$ A - B = \begin{bmatrix} 1-7 & 2-8 & 3-9 \\ 4-10 & 5-11 & 6-12 \end{bmatrix} = \begin{bmatrix} -6 & -6 & -6 \\ -6 & -6 & -6 \end{bmatrix} $$

3. Scalar Multiplication of Matrices

Scalar multiplication involves multiplying every element of a matrix by a scalar (a number). If k is a scalar and A = $[a_{ij}]_{m \times n}$ is a matrix, then kA is a matrix where each element is k times the corresponding element of A. $kA = [ka_{ij}]_{m \times n}$.

Example: Let $$ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \quad \text{and} \quad k = 3 $$ Then $$ 3A = 3 \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 3 \times 1 & 3 \times 2 \\ 3 \times 3 & 3 \times 4 \end{bmatrix} = \begin{bmatrix} 3 & 6 \\ 9 & 12 \end{bmatrix} $$

Properties of Scalar Multiplication:

  • $k(A + B) = kA + kB$
  • $(k + l)A = kA + lA$, where k and l are scalars.
  • $k(lA) = (kl)A = l(kA)$, where k and l are scalars.
  • $1 \cdot A = A$
  • $0 \cdot A = O_{m \times n}$

4. Multiplication of Matrices

Matrix multiplication is a more complex operation than addition or scalar multiplication. For the product of two matrices AB to be defined, the number of columns in the first matrix (A) must be equal to the number of rows in the second matrix (B). If A is an m x n matrix and B is an n x p matrix, then their product AB is an m x p matrix. Let $A = [a_{ij}]_{m \times n}$ and $B = [b_{jk}]_{n \times p}$. The element in the i-th row and j-th column of the product matrix AB, denoted by $c_{ij}$, is given by the sum of the products of the elements of the i-th row of A and the corresponding elements of the j-th column of B. $$ c_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj} = a_{i1}b_{1j} + a_{i2}b_{2j} + \dots + a_{in}b_{nj} $$

Example: Let $$ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \quad \text{(order 2 x 3)} $$ and $$ B = \begin{bmatrix} 7 & 8 \\ 9 & 10 \\ 11 & 12 \end{bmatrix} \quad \text{(order 3 x 2)} $$ The number of columns in A (3) is equal to the number of rows in B (3). So, the product AB is defined, and the order of AB will be 2 x 2. Let AB = C = $[c_{ij}]_{2 \times 2}$. To find $c_{11}$ (element in 1st row, 1st column): $c_{11} = (1 \times 7) + (2 \times 9) + (3 \times 11) = 7 + 18 + 33 = 58$ To find $c_{12}$ (element in 1st row, 2nd column): $c_{12} = (1 \times 8) + (2 \times 10) + (3 \times 12) = 8 + 20 + 36 = 64$ To find $c_{21}$ (element in 2nd row, 1st column): $c_{21} = (4 \times 7) + (5 \times 9) + (6 \times 11) = 28 + 45 + 66 = 139$ To find $c_{22}$ (element in 2nd row, 2nd column): $c_{22} = (4 \times 8) + (5 \times 10) + (6 \times 12) = 32 + 50 + 72 = 154$ So, $$ AB = \begin{bmatrix} 58 & 64 \\ 139 & 154 \end{bmatrix} $$

Important Note: If AB is defined, BA may not be defined. Even if both AB and BA are defined, AB is generally not equal to BA. This means matrix multiplication is not commutative.

Example: Let $$ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \quad \text{and} \quad B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} $$ $AB = \begin{bmatrix} (1 \times 5 + 2 \times 7) & (1 \times 6 + 2 \times 8) \\ (3 \times 5 + 4 \times 7) & (3 \times 6 + 4 \times 8) \end{bmatrix} = \begin{bmatrix} (5 + 14) & (6 + 16) \\ (15 + 28) & (18 + 32) \end{bmatrix} = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}$ $BA = \begin{bmatrix} (5 \times 1 + 6 \times 3) & (5 \times 2 + 6 \times 4) \\ (7 \times 1 + 8 \times 3) & (7 \times 2 + 8 \times 4) \end{bmatrix} = \begin{bmatrix} (5 + 18) & (10 + 24) \\ (7 + 24) & (14 + 32) \end{bmatrix} = \begin{bmatrix} 23 & 34 \\ 31 & 46 \end{bmatrix}$ Clearly, $AB \neq BA$.

Properties of Matrix Multiplication:

  • Associative Law: (AB)C = A(BC) (provided the products are defined).
  • Distributive Law:
    • A(B + C) = AB + AC
    • (A + B)C = AC + BC
    (provided the sums and products are defined).
  • Existence of Multiplicative Identity: For any square matrix A of order n x n, there exists an identity matrix $I_n$ of order n x n such that $AI_n = I_n A = A$.
  • Non-existence of Zero Divisors (in general): If AB = O, it does not necessarily imply that A = O or B = O. Example: Let $A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$ and $B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$. $AB = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = O$. Here, neither A nor B is a zero matrix.

Special Matrices in Multiplication:

  • Idempotent Matrix: A matrix A is idempotent if $A^2 = A$.
  • Involutory Matrix: A matrix A is involutory if $A^2 = I$.
  • Nilpotent Matrix: A matrix A is nilpotent if $A^k = O$ for some positive integer k. The smallest such k is called the index of nilpotency.

Transpose of a Matrix

The transpose of a matrix A, denoted by $A^T$ or $A'$, is obtained by interchanging its rows and columns. If A is an m x n matrix, then $A^T$ is an n x m matrix. If $A = [a_{ij}]_{m \times n}$, then $A^T = [a_{ji}]_{n \times m}$.

Example: Let $$ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} $$ Then $$ A^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix} $$

Properties of Transpose:

  • $(A^T)^T = A$
  • $(A + B)^T = A^T + B^T$
  • $(kA)^T = kA^T$, where k is a scalar.
  • $(AB)^T = B^T A^T$ (This is a very important property for multiplication).

Symmetric and Skew-Symmetric Matrices

A square matrix A is called:

  • Symmetric Matrix: If $A^T = A$. This means $a_{ij} = a_{ji}$ for all i, j. The elements across the main diagonal are equal. Example: $$ A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 5 \\ 3 & 5 & 6 \end{bmatrix} $$
  • Skew-Symmetric Matrix: If $A^T = -A$. This means $a_{ij} = -a_{ji}$ for all i, j. Consequently, the diagonal elements must be zero ($a_{ii} = -a_{ii} \Rightarrow 2a_{ii} = 0 \Rightarrow a_{ii} = 0$). Example: $$ A = \begin{bmatrix} 0 & 2 & -3 \\ -2 & 0 & 5 \\ 3 & -5 & 0 \end{bmatrix} $$

Any square matrix A can be expressed as the sum of a symmetric matrix and a skew-symmetric matrix: $A = \frac{1}{2}(A + A^T) + \frac{1}{2}(A - A^T)$. Here, $\frac{1}{2}(A + A^T)$ is a symmetric matrix, and $\frac{1}{2}(A - A^T)$ is a skew-symmetric matrix.

Exam Tip: Remember the property $(AB)^T = B^T A^T$. This is often tested. Also, any square matrix can be uniquely represented as a sum of a symmetric and a skew-symmetric matrix.

Trace of a Matrix

The trace of a square matrix A (denoted as tr(A)) is the sum of the elements on its main diagonal. It is defined only for square matrices. If $A = [a_{ij}]_{n \times n}$, then $tr(A) = \sum_{i=1}^{n} a_{ii} = a_{11} + a_{22} + \dots + a_{nn}$.

Example: If $$ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} $$ Then $tr(A) = 1 + 5 + 9 = 15$.

Properties of Trace:

  • $tr(A + B) = tr(A) + tr(B)$
  • $tr(kA) = k \cdot tr(A)$
  • $tr(AB) = tr(BA)$ (This is a crucial property for cyclical permutations).
  • $tr(A^T) = tr(A)$
Mnemonic for $(AB)^T = B^T A^T$: Think of it as "Transpose reverses the order of multiplication." Just like when you reverse your shoes (transpose), you put the second shoe on first.