# Matrix

A rectangular table of numbers with rows and columns. A matrix with m rows and n columns is called m by n.

Maths (university) · Part 08: Vectors, matrices and linear systems · Card 4 of 9 · Last updated 2026-10-19

## Analogy

A spreadsheet of numbers.

## Example

**A 2 by 3 matrix**

[[1,2,3],[4,5,6]]
It has 2 rows and 3 columns.
Entry in row 2, column 3 is 6.
Add matrices of the same size entrywise.

## In practice

Matrices store data, describe equations, and represent transformations such as rotations.

## Practice

### Flashcards

- **What size is the product of a 2 by 3 and a 3 by 4 matrix?** 2 by 4.

## Questions people ask

### When can two matrices be added?

Only when they have the same size, since you add matching entries. A 2 by 3 matrix cannot be added to a 3 by 2 matrix. Adding [[1,2],[3,4]] and [[5,6],[7,8]] gives [[6,8],[10,12]], by adding each position. Subtraction works the same way, and multiplying by a number scales every entry in the matrix.

### What is the identity matrix?

A square matrix with ones down the diagonal and zeros elsewhere. Multiplying any matrix by it leaves it unchanged, just as multiplying a number by 1 does. The 2 by 2 identity is [[1,0],[0,1]]. It is written I, and inverses are defined using it.

## Related concepts

- [Matrix multiplication](https://studyvisually.com/learn/science/maths-university/maths-university-part-8/maths-university-part-8-concept-5)
- [Augmented matrix](https://studyvisually.com/learn/science/maths-university/maths-university-part-8/maths-university-part-8-concept-7)
- [Inverse matrix](https://studyvisually.com/learn/science/maths-university/maths-university-part-9/maths-university-part-9-concept-3)
- [Solving with the inverse](https://studyvisually.com/learn/science/maths-university/maths-university-part-9/maths-university-part-9-concept-4)

Web page: https://studyvisually.com/learn/science/maths-university/maths-university-part-8/maths-university-part-8-concept-4
Study this card in the app: https://studyvisually.com/app/learn?category=maths-university&card=maths-university-part-8-concept-4
