Pearson's correlation is really the cosine of an angle between two data vectors
The most widely used measure of how two things move together carries Karl Pearson's name, but a French scientist published its formula decades earlier. Underneath the algebra sits a simple geometric picture: treat each dataset as an arrow in many dimensions, and the correlation is just the cosine of the angle between them.
Pearson's r gauges how closely two sets of numbers follow a straight-line relationship. It takes the covariance of the two variables, a measure of whether they rise and fall together, and divides it by the product of their standard deviations. That scaling strips out the units, so the answer always lands between minus one and one and can be compared across completely different pairs of measurements. For instance, the ages and heights of schoolchildren would give a value well above zero but short of one, since a perfect score would mean an unrealistically exact link.
The geometry makes the range intuitive. Shift each dataset so its average is zero, then treat the n values of each as the coordinates of an arrow in n-dimensional space. If the arrows point nearly the same way, the angle between them is small and the cosine approaches one. If they sit at right angles, the cosine is zero, meaning no linear correlation, a situation statisticians call orthogonality. Arrows pointing in opposite directions give a value near minus one, which signals anticorrelation.
The history is a tangle of credit. Francis Galton introduced the underlying idea in the 1880s, and Pearson developed it into the coefficient we use. Yet Auguste Bravais had already derived and published the mathematical formula in 1844. The naming is often cited as an example of Stigler's Law, the observation that scientific discoveries are rarely named after their original discoverer.
The coefficient has a real limitation: it sees only straight-line relationships and can miss other patterns entirely. For hand calculation there are convenient rearrangements of the formula that allow a single pass through the data, though with some numbers these shortcuts can become numerically unstable.
Source: Pearson correlation coefficient