Correlation matrixHow every pair moves together.
One cell for every pair of numbers, each with a number from -1 to 1 and a colour. Dark blue moves together, dark red moves opposite, pale means no link.
- Answers Do two things move together?
- Your data several numbers per item
- Numbers about 3 to 30
- Cell value Pearson's r, -1 to 1
- Excel CORREL and the Analysis ToolPak
- Together
- Opposite
What is a correlation matrix?
A correlation matrix is a grid with one row and one column per number. Each cell holds the correlation of its pair, a number from -1 to 1: 1 means they rise together perfectly, -1 means one falls exactly as the other rises, and 0 means no straight-line link. A colour for each cell makes the strong pairs stand out.
The estate agent's 12 houses again: size, rooms, age and price. Size and price have a correlation of 0.91; age and price -0.53. The darkest blue cells are the pairs that move together most.
Why use a correlation matrix?
Because it sums up every pair in one small grid.
- Every pair at once. Twenty numbers make 190 pairs, still one picture.
- Strong links jump out. Dark cells draw the eye.
- Direction and strength. The sign says which way, the size how strongly.
- A first step. It picks which pairs deserve a scatter plot.
How does a correlation matrix work?
Four steps turn a table into a grid of links.
- Step 1 of 4Every pairA scatter plot for each pair of numbers.
- Step 2 of 4One number per pairHow close the dots are to a straight line, and which way: r.
- Together
- Opposite
- Step 3 of 4Colour by strengthBlue for together, red for opposite; darker is stronger.
- Together
- Opposite
- Step 4 of 4Half is enoughThe grid is a mirror, so the lower half holds every pair.
- Together
- Opposite
The diagonal is always 1: every number moves perfectly with itself.
What are the parts of a correlation matrix?
Four parts, and each one has a job.
- Together
- Opposite
- Strong pairclose to 1 or -1, a dark cell
- Weak pairclose to 0, a pale cell
- Diagonaleach number with itself, always 1
- Namethe number of this row and column
How do you read a correlation matrix?
Three looks, in this order.
- Find the darkest cellsPrice moves most with size (0.91) and rooms (0.80).
- Together
- Opposite
- Find the red cellsAge moves against price (-0.53): older houses tend to cost less.
- Together
- Opposite
- Find the pale cellsAge and size barely move together (-0.14).
- Together
- Opposite
What kinds of correlation matrix are there?
The same houses, three ways.
- Kind 1Full gridEvery cell, with its number.
- Together
- Opposite
- Kind 2Lower halfThe mirror half left out.
- Together
- Opposite
- Kind 3Colour onlyNo numbers: for many numbers at once.
- Together
- Opposite
Pearson's r measures straight-line links. Spearman's rank correlation, also common, measures any link that keeps going one way, even a curved one.
When should you use a correlation matrix?
When you have many numbers and want to know which pairs are linked.
- there are about 3 to 30 numbers
- you need an overview
- you pick pairs for a closer look
- readers know what r means
- the shape of a link matters (a scatterplot matrix)
- there are only two numbers (a scatter plot)
- links may be curved (scatter plots first)
Correlation matrix or scatterplot matrix?
Numbers for the overview, dots for the shapes.
- Together
- Opposite
The scatterplot matrix shows every dot, so curves and odd items stay visible. The correlation matrix is faster to scan and fits far more numbers, but one number per pair hides the shape behind it.
How do you make a correlation matrix?
A function in Excel; a few lines in Python or R.
In Excel, CORREL(range1, range2) gives one pair; the Analysis ToolPak's Data > Data Analysis > Correlation builds the whole grid, and conditional formatting > Color Scales colours it. In Python, pandas' df.corr() makes the grid and seaborn's heatmap draws it. In Power BI, a matrix with a correlation measure and conditional formatting works for a few numbers; the key influencers visual answers "what moves this number?" without one.
What goes wrong with correlation matrices?
The most common mistake, and its fix: trusting r without looking at the dots.
| Mistake | Why it hurts | Fix |
|---|---|---|
| Trusting r without the dots | Curves and outliers mislead | Scatter plots of key pairs |
| Reading a link as a cause | r says nothing about why | Say "moves with" |
| Few items | r swings by chance | About 30 items or more for firm claims |
| A rainbow colour scale | Hard to see strength | Two colours, darker for stronger |
| Showing both mirror halves with many numbers | Twice the clutter | The lower half only |
Every chart for “Do two things move together?”
- Two numbersScatter plotOne dot per item, two numbers as its position.
- Two numbersTrend lineThe straight line that best fits a scatter of dots.
- Two numbersHexbin plotA scatter with too many dots, counted in hexagons.
- Two numbersContour plotRings around where dots crowd, like height lines on a map.
- Three numbersBubble chartA scatter plot whose dot size is a third number.
- Many numbersScatterplot matrixA scatter plot for every pair of numbers, in a grid.
- Two categoriesHeat mapA grid where colour shows the value, so patterns jump out.
- Two categoriesQuadrant chartA scatter split into four boxes, for sorting items into groups.
Read on, step by step.
Does it fit your data? Try it.
Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.