Matrices: Definition and Basic Concepts
A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns.
NoteIn the context of mathematics, matrices are fundamental tools used in various fields, including linear algebra, computer graphics, and data analysis.
Elements, Rows, Columns, and Order
- A matrix is typically denoted by a capital letter, such as A, B, or M.
- The individual entries in a matrix are called elements.
- The horizontal lines of elements are called rows, while the vertical lines are called columns.
- The order (or dimension) of a matrix is described by the number of rows and columns it contains.
An $m × n$ matrix has $m$ rows and $n$ columns.
NoteThe order of a matrix is always written as "rows × columns". A 2 × 3 matrix has 2 rows and 3 columns, not the other way around.
ExampleConsider the following matrix \( A \): \[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \] This is a \(3 \times 3\) matrix (3 rows and 3 columns). The element in the second row and third column is 6.
Matrix Algebra
Equality of Matrices
Two matrices are considered equal if they have the same order and all corresponding elements are equal.
ExampleIf \[ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \] and \[ B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \] then \[ A = B. \]
Addition and Subtraction
Matrices of the same order can be added or subtracted element by element.
ExampleIf \[ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \] and \[ B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix}, \] then: \[ A + B = \begin{bmatrix} 1 + 5 & 2 + 6 \\ 3 + 7 & 4 + 8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \\ 10 & 12 \end{bmatrix} \]\[ A - B = \begin{bmatrix} 1 - 5 & 2 - 6 \\ 3 - 7 & 4 - 8 \end{bmatrix} = \begin{bmatrix} -4 & -4 \\ -4 & -4 \end{bmatrix} \]
Scalar Multiplication
A matrix can be multiplied by a scalar (a single number) by multiplying each element of the matrix by that scalar.
ExampleIf \[ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \] and $k = 3$, then: \[ 3A = \begin{bmatrix} 3(1) & 3(2) \\ 3(3) & 3(4) \end{bmatrix} = \begin{bmatrix} 3 & 6 \\ 9 & 12 \end{bmatrix} \]
Matrix Multiplication
- Matrix multiplication is more complex than addition or scalar multiplication.
- To multiply two matrices, the number of columns in the first matrix must equal the number of rows in the second matrix.
For matrices $A (m × n)$ and $B (n × p)$, their product $AB$ is an $m × p$ matrix.
ExampleIf \[ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} \] Then, \[ 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} 19 & 22 \\ 43 & 50 \end{bmatrix} \]
Common MistakeMatrix multiplication is not commutative. In general, AB ≠ BA, even when both products are defined.
Properties of Matrix Multiplication
- Associativity: (AB)C = A(BC)
- Distributivity: A(B + C) = AB + AC and (A + B)C = AC + BC
- Non-commutativity: AB ≠ BA (in general)
Special Matrices
Identity Matrix
The identity matrix, denoted as $I$, is a square matrix with 1s on the main diagonal and 0s elsewhere. When multiplied with any matrix $A$ of compatible size, $AI = IA = A$.
ExampleThe $3 \times 3$ identity matrix is: \[ I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \]