Proof that $\rho = \pm1$ implies linear combination I need to prove that
$$\rho(X,Y) = \pm 1 \implies Y = aX+b,$$
for some constants $a, b$.
With the help of this thread and this document here's what I've got so far:
Let $X, Y$ be random variables and $a$ some constant. $aX + Y$ is also a random variable whose variance by definition is non-negative
$$V(aX+Y) \ge 0.$$
From variance properties:
$$a^2 V(X)+2a\text{Cov}{X,Y}+V(Y)\ge 0$$
This is a quadratic as a function of $a$, which has a maximum of 1 root. It has a root only for $a$ that satisfies $$a^2 V(X)+2a\text{Cov}{X,Y}+V(Y)=0$$
let it be $a_0$. That means that
$$V(a_0X+Y)=0$$
How can I continue from here?
Thank you.

Hint: In which cases do we have equality in the Cauchy-Schwarz inequality?

Further hint: Here, the Cauchy-Schwarz inequality is used in the form $$\operatorname{Cov}(X,Y)^2\le\operatorname{Var}(X) \operatorname{Var}(Y)$$

