Matrix

Definitionnoun

What is a matrix in math?

A matrix is a rectangular array of numbers arranged in rows and columns, written inside square brackets. A matrix with m rows and n columns has dimensions m × n, read “m by n”. Each number is an entry, named by its row and then its column: a23 is in row 2, column 3. The plural is matrices.

In Spanish
matriz
Also called
matrices, array of numbers, rectangular array
How to say it
MAY-triks; plural MAY-trih-seez
Grade level
Algebra 2
Algebra 2PrecalculusCCSS HSN-VM.C.6CCSS HSN-VM.C.8CCSS HSN-VM.C.9ACCUPLACERASVABACT

Matrix in a picture

Rows, columns and entries of a matrixA 2 by 3 matrix A with rows 4, -1, 0 and 2, 7, 5. Row 2 is shaded blue, column 3 is shaded yellow, and the entry a sub 2 3 = 5 is circled. Below: a row times a column, 2 times 1 + 7 times 0 + 5 times 3 = 17.4−10275A =row 2column 3a₂₃ = 52 rows × 3 columns: a 2 × 3 matrixMultiply: row of A times column of Brow (2, 7, 5)·column (1, 0, 3)2·1 + 7·0 + 5·3 = 17A (2 × 3) times B (3 × n) works: inner sizes match.
An entry is named by row, then column. In a product, each entry comes from one row of the first matrix times one column of the second, added up.

Formal definition and notation

An m × n matrix A is a rectangular array of mn numbers aij, where i = 1, …, m is the row and j = 1, …, n is the column. Two matrices are equal when they have the same dimensions and equal corresponding entries. Matrices of the same dimensions are added entry by entry; the product AB is defined when A is m × n and B is n × p, giving an m × p matrix with entries cik = Σnj=1 aijbjk.

Symbol Read it as Meaning
m × n m by n the dimensions: rows first, then columns
aij a sub i j the entry in row i, column j
kA k times A scalar multiplication: every entry times k
det A determinant of A a number computed from a square matrix

Key facts

  • Dimensions are always rows × columns. A matrix with 3 rows and 2 columns is 3 × 2, not 2 × 3.
  • Add or subtract only matrices with the same dimensions, entry by entry.
  • Scalar multiplication multiplies every entry by the same number.
  • Matrix multiplication is not commutative: usually AB ≠ BA, and one of them may not even exist.
  • A square matrix has as many rows as columns. The identity matrix has 1s on the main diagonal and 0s elsewhere.
  • Matrices store data (tables, networks, game payoffs) and solve a system of equations.

Matrix operations

Matrix operations
(A + B)ij = aij + bij,  (AB)ik = Σj aijbjk
A + B
only for matrices with the same dimensions
AB
only when the columns of A equal the rows of B: row of A times column of B

Check sizes before multiplying: (2 × 3)(3 × 4) gives a 2 × 4 matrix. The inner numbers must match; the outer numbers give the answer’s size.

Matrix examples, step by step

Example 1: Dimensions and entries

Warm-up

Matrix M has rows (3, 8), (−2, 0) and (5, 1). What are its dimensions, and what is m21?

  1. Count rows: 3. Count columns: 2. So M is 3 × 2.
  2. m21 is row 2, column 1: the row (−2, 0), first entry.

Answer: M is a 3 × 2 matrix, and m21 = −2.

Example 2: Add and scale

Core

A has rows (1, 4) and (−3, 2); B has rows (5, −1) and (0, 6). Find A + B and 2A.

  1. Add matching entries: 1 + 5 = 6, 4 + (−1) = 3, −3 + 0 = −3, 2 + 6 = 8.
  2. So A + B has rows (6, 3) and (−3, 8).
  3. Double every entry of A: 2A has rows (2, 8) and (−6, 4).

Answer: A + B has rows (6, 3) and (-3, 8); 2A has rows (2, 8) and (-6, 4).

Example 3: Multiply, both orders

Test-style

A has rows (1, 2) and (3, 4); B has rows (2, 0) and (1, 5). Find AB and show that AB ≠ BA.

  1. Row 1 of A times the columns of B: 1 · 2 + 2 · 1 = 4 and 1 · 0 + 2 · 5 = 10.
  2. Row 2: 3 · 2 + 4 · 1 = 10 and 3 · 0 + 4 · 5 = 20.
  3. So AB has rows (4, 10) and (10, 20).
  4. The other order: BA has rows (2, 4) and (16, 22), which is different.

Answer: AB has rows (4, 10) and (10, 20), while BA has rows (2, 4) and (16, 22), so AB ≠ BA.

Common mistakes

✗ MistakeA matrix with 3 rows and 2 columns is 2 × 3.
✓ InsteadIt is 3 × 2: rows first.

Dimensions and entry names always list the row before the column, like reading a table down to the row and then across.

✗ MistakeMultiplying matrices entry by entry: rows (1, 2), (3, 4) times rows (2, 0), (1, 5) gives rows (2, 0), (3, 20).
✓ InsteadThe product has rows (4, 10) and (10, 20).

Matrix multiplication combines a row of the first with a column of the second: multiply in pairs, then add.

✗ MistakeAdding a 2 × 2 matrix and a 2 × 3 matrix by filling the gap with 0s.
✓ InsteadThe sum is undefined.

Addition needs every entry to have a partner, so the dimensions must match exactly.

Not to be confused with

Matrixvs.Determinant

A matrix is the whole array; its determinant is a single number computed from a square matrix. For rows (3, 1) and (2, 4), the determinant is 3 · 4 − 1 · 2 = 10.

Matrixvs.Vector

A vector is a quantity with size and direction, often written as a single row or column of numbers. A matrix can have many rows and columns; a vector is a matrix with one row or one column.

Matrixvs.Two-way table

A two-way table organizes data with labels. A matrix holds only the numbers, so you can add, scale and multiply them.

Quick check: 3 questions

Question 1 of 3

A matrix has 2 rows and 5 columns. What are its dimensions?

Show answer and explanation

Answer: C. Rows first, then columns: 2 × 5. 5 × 2 reverses the order, and 10 and 7 are the entry count and the sum, not dimensions.

Question 2 of 3

A is 2 × 3 and B is 3 × 4. What are the dimensions of AB?

Show answer and explanation

Answer: A. The inner sizes (3 and 3) match, so the product exists, and the outer sizes give 2 × 4. BA would be undefined, since 4 does not match 2.

Question 3 of 3

A has rows (2, −1) and (0, 3). What is the entry in row 2, column 2 of −3A?

Show answer and explanation

Answer: D. Scalar multiplication multiplies every entry: −3 · 3 = −9. 3 forgets to multiply, −6 is row 1, column 1, and 0 is row 2, column 1.

Matrix: frequently asked questions

How do you read the dimensions of a matrix?

Count the rows (horizontal) first and the columns (vertical) second, and write rows × columns. A matrix with 4 rows and 2 columns is a 4 × 2 matrix, read “4 by 2”, and it holds 8 entries. A matrix with the same number of rows and columns, such as 3 × 3, is called a square matrix.

When can you multiply two matrices?

Only when the number of columns in the first equals the number of rows in the second. Write the dimensions side by side: (2 × 3)(3 × 5). If the inner numbers match, the product exists and its size is the outer numbers, 2 × 5. Because the order matters, AB can exist while BA does not.

What are matrices used for?

Matrices organize numbers so that many calculations happen at once. They solve systems of linear equations, transform images in computer graphics, track connections in networks, store spreadsheet-style data and run the calculations behind statistics and machine learning. In a game, a payoff matrix lists what each player wins for every choice.

Practice and tools

Sources

  1. Common Core State Standards, High School Number and Quantity, Vector and Matrix Quantities (HSN-VM.C.6, C.8, C.9)
  2. OpenStax, College Algebra 2e, 7.5 Matrices and Matrix Operations
  3. Weisstein, Eric W. "Matrix Multiplication." MathWorld, Wolfram Research

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS HSN-VM.C.6, CCSS HSN-VM.C.8, CCSS HSN-VM.C.9

Cite this entry

Effortless Math Team. “Matrix.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/matrix/

Flashcard

TermMatrixrows × columns
DefinitionA rectangular array of numbers in rows and columns. A matrix with 2 rows and 3 columns is 2 × 3; a23 is in row 2, column 3.
Study the full deck

Browse all terms in the Math Dictionary · More algebra terms · Random term