# How to prove inverse direction for correlation coefficient?

To show: If |Cor(X,Y)| = 1, then there exists a, b ∈ R s.t Y = bX + a. Any ideas or hints to proceed?

Basically, I've to prove that if the absolute value of correlation b/w two random variables is 1, then they should be linearly related.

So far,

$$|cor(X, Y)| = 1$$

$$\frac{|Cov(X, Y)|}{|\sigma(X) \sigma(Y)|} = 1$$

$$|Cov(X, Y)| = |\sigma(X) \sigma(Y)|$$

How to proceed further?

• Hint: when is the Cauchy-Schwarz inequality actually an equality? – Watson Nov 17 '16 at 15:37
• Your statement is only almost sure: consider $X \sim N(0,1)$ and $Y=-X$ when $X$ is rational and $Y=+X$ when $X$ is irrational – Henry Nov 17 '16 at 15:40
• @Watson: Wiki says the equality holds when they are "linearly related". But I've to show/prove this formally and I don't know how to proceed. – rakudo Nov 17 '16 at 15:47