Mathwords logoMathwords

Introduction to Matrices — Definition, Formula & Examples

A matrix is a rectangular array of numbers arranged in rows and columns, enclosed in brackets. Matrices organize data so you can perform calculations on entire systems of numbers at once.

A matrix AA of order m×nm \times n is an ordered rectangular array of mnm \cdot n elements aija_{ij}, where i{1,2,,m}i \in \{1, 2, \ldots, m\} denotes the row and j{1,2,,n}j \in \{1, 2, \ldots, n\} denotes the column. When m=nm = n, the matrix is called a square matrix.

Key Formula

A=[a11a12a1na21a22a2nam1am2amn]A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}
Where:
  • AA = The matrix name
  • mm = Number of rows
  • nn = Number of columns
  • aija_{ij} = The entry in row i and column j

How It Works

Each entry in a matrix is identified by its row number and column number. For example, the entry a2,3a_{2,3} sits in the second row and third column. The size (or order) of a matrix is always stated as rows ×\times columns — a matrix with 3 rows and 2 columns is a 3×23 \times 2 matrix. You can add two matrices only if they have the same dimensions, and you multiply them only when the number of columns in the first matches the number of rows in the second. Matrices let you represent and solve systems of linear equations, apply geometric transformations, and store data in fields from computer graphics to economics.

Worked Example

Problem: Given the matrix below, state its dimensions and identify the entry in row 2, column 3.
Step 1: Write the matrix.
B=[514073]B = \begin{bmatrix} 5 & -1 & 4 \\ 0 & 7 & -3 \end{bmatrix}
Step 2: Count the rows and columns. There are 2 rows and 3 columns, so the dimensions are 2×32 \times 3.
Step 3: Locate the entry in row 2, column 3. Go to the second row and move to the third position.
b2,3=3b_{2,3} = -3
Answer: Matrix BB is a 2×32 \times 3 matrix, and the entry b2,3b_{2,3} is 3-3.

Another Example

Problem: Add the two matrices: C=[1432]C = \begin{bmatrix} 1 & 4 \\ 3 & 2 \end{bmatrix} and D=[5206]D = \begin{bmatrix} 5 & -2 \\ 0 & 6 \end{bmatrix}.
Step 1: Confirm the dimensions match. Both CC and DD are 2×22 \times 2, so addition is defined.
Step 2: Add corresponding entries position by position.
C+D=[1+54+(2)3+02+6]C + D = \begin{bmatrix} 1+5 & 4+(-2) \\ 3+0 & 2+6 \end{bmatrix}
Step 3: Simplify each entry.
C+D=[6238]C + D = \begin{bmatrix} 6 & 2 \\ 3 & 8 \end{bmatrix}
Answer: C+D=[6238]C + D = \begin{bmatrix} 6 & 2 \\ 3 & 8 \end{bmatrix}

Why It Matters

Matrices are foundational in high school Algebra 2 and Precalculus, where you use them to solve systems of linear equations efficiently. In college, linear algebra courses build almost entirely on matrix operations. Professionals in computer graphics, data science, engineering, and machine learning rely on matrices daily to represent transformations, datasets, and neural network weights.

Common Mistakes

Mistake: Writing dimensions as columns × rows instead of rows × columns.
Correction: Always state dimensions as rows first, then columns. A matrix with 3 rows and 4 columns is 3×43 \times 4, not 4×34 \times 3.
Mistake: Trying to add or subtract matrices of different dimensions.
Correction: Matrix addition requires both matrices to have exactly the same number of rows and the same number of columns. A 2×32 \times 3 matrix cannot be added to a 3×23 \times 2 matrix.

Related Terms