How to Use Matrices to Represent Data
A matrix organizes data into rows and columns, so its dimensions are written rows by columns and that order never changes. Below: how to set up a matrix from a data table, what each entry position means, and worked examples of reading and building one.
Build a matrix from a data table
Choose what each row and column represents, keep that order fixed, and put each number in its matching position. A matrix is the rectangular array of numbers; the row labels, column labels and units tell you what those numbers mean.
Suppose three school clubs record the number of notebooks and pencils they collect. These are invented values for a worked example.
| Club | Notebooks | Pencils |
|---|---|---|
| Art | 12 | 18 |
| Science | 9 | 15 |
| Drama | 6 | 10 |
Use rows in the order Art, Science, Drama and columns in the order Notebooks, Pencils. The data matrix is
\(A=\begin{bmatrix}12 & 18\\9 & 15\\6 & 10\end{bmatrix}.\)
There are three rows and two columns, so A is a 3 × 2 matrix. The club names and item names remain in your key; they are not extra numerical entries.
Read an entry in context
In \(a_{ij}\), the first subscript gives the row and the second gives the column. Thus \(a_{21}=9\) means Science collected 9 notebooks. By contrast, \(a_{12}=18\) means Art collected 18 pencils. Swapping the subscripts changes which value you read.
The second row, [9, 15], describes Science’s collection. The second column, [18, 15, 10], describes pencils across all three clubs. The pencil total is 18 + 15 + 10 = 43. Read the labels before deciding whether a row total or a column total answers your question.
You may instead put clubs in columns and item types in rows. That gives \(A^T=\begin{bmatrix}12 & 9 & 6\\18 & 15 & 10\end{bmatrix}\), a 2 × 3 matrix containing the same information with a different orientation. Update the labels whenever you transpose the matrix.
Check the labels before calculating
- Keep one ordering. If another day’s matrix lists Science first, reorder its rows before combining matching club totals.
- Keep units clear. A column measured in centimeters is different from one measured in kilograms. A rectangular matrix can store both, but adding those two measurements would not produce a meaningful total.
- Distinguish zero from missing data. Zero notebooks means none were collected; an unrecorded count is unknown. Do not silently replace an unknown value with zero.
- Check the shape. Every row must contain one entry for every column category.
When two matrices use the same clubs, item categories and units, you can add their corresponding entries to combine the counts. For more connected lessons, use the matrix topics in the Algebra 2 Online Center.
Curriculum connection: Common Core HSN-VM.C.6 includes representing and manipulating data with matrices. The example and explanations above are original to this lesson.
Matrix operations: a follow-up review
What to notice first
Common student mistake
Key formulas and cues
A reliable path
- Check dimensionsRows by columns determines what operation is legal.
- Use the correct ruleAddition is entry-by-entry; multiplication is row-by-column.
- Interpret the resultFor systems, translate the matrix answer back into variables.
Worked examples
Add matrices
- The matrices have the same size.
- Add matching entries.
- Compute each position.
Multiplication size
- Inner dimensions match: 3 and 3.
- The product is allowed.
- Outer dimensions give the result size.
Try one before moving on
Use Matrices to Represent Data: pop-up practice
Related Topics
- How to Add and Subtract Matrices
- Transformation Using Matrices
- How to Find Inverses of \(2×2\) Matrices
- How to Solve a System of Equations Using Matrices
Other ways to represent information with matrices
Matrices can also describe equation systems, transformations and networks. These are different uses from arranging observations in a data table.
1. Representing a system of equations: A system of linear equations can be represented as a matrix equation of the form \(AX = B\), where \(A\) is the coefficient matrix, \(X\) is the variable matrix, and \(B\) is the constant matrix. For example, the system of equations \(2x + 3y = 6\) and \(4x + 6y = 12\) can be represented as the matrix equation:
\(\begin{bmatrix}2 & 3 \\4 & 6 \end{bmatrix}\)\(\begin{bmatrix}x \\y \end{bmatrix}\)\(=\begin{bmatrix}6\\12 \end{bmatrix}\)
2. Representing a set of data: A set of data can be represented as a matrix, where each row represents an observation and each column represents a variable. For example, a set of data on the height and weight of three individuals can be represented as the matrix:
| Height (cm) | Weight (kg) |
| \(170\) | \(70\) |
| \(175\) | \(75\) |
| \(180\) | \(80\) |
3. Representing a linear transformation: A linear transformation can be represented as a matrix transformation of the form \(Y = AX\), where \(A\) is the transformation matrix and \(X\) and \(Y\) are the input and output vectors. For example, a transformation that doubles the \(x\)-coordinate and triples the \(y\)-coordinate can be represented as the matrix:
\(\begin{bmatrix}2 & 0 \\0 & 3 \end{bmatrix}\)\(\begin{bmatrix}x \\y \end{bmatrix}\)
4. Representing a graph: A graph can be represented as an adjacency matrix, where each element in the matrix represents the presence or absence of an edge between two nodes.
Matrices are widely used in various fields such as statistics, physics, computer science, engineering, and many more, to represent and organize data in a compact and efficient way.
Related to This Article
More math articles
- 8th Grade PSSA Math Practice Test Questions
- Order of Operations Practice — Free Interactive Drills
- How to Solve the Ambiguous Case (SSA) in Trigonometry
- Geometry Puzzle – Challenge 60
- Math Café: How to Learn the Art of Writing and Solving Two-variable Equations
- Environmental Science: Pollution, Exposure, and Safer Design
- The Digestive System
- Best Calculator For 8th Grade Students
- New Jersey NJSLA Grade 4 Math Free Worksheets: Free Printable Worksheets Covering Every Skill
- Relating Fractions and Decimals for 4th Grade



What people say about "How to Use Matrices to Represent Data"?
No one replied yet.