I found this way of expressing that equality holds in Cauchy Schwarz inequality iff $\textbf{x},\textbf{y}$ and are linearly dependent in a book (as an exercise), but I think it is wrong, so there's a counterexample for it. I'm not sure if it is a valid counterexample.
Statement:
$| \langle\textbf{x} ,\textbf{y}\rangle| = \| \textbf{x}\|\| \textbf{y}\|$ iff $\textbf{x} = \alpha\textbf{y}$ for some $\alpha \in \mathbb{R}$
Counterexample:
Let $\textbf{y} = (0,0) \in \mathbb{R^2}$, $\textbf{x} = (1,1) \in \mathbb{R^2}$. Then we have:
$$|\langle \textbf{x},\textbf{y}\rangle| = |\langle \textbf{x},\textbf{0}\rangle| = 0 = 1\cdot0 = \| \textbf{x}\|\| \textbf{y}\|$$ But $$\textbf{x} = (1,1) \neq (\alpha\cdot0,\alpha\cdot0) = \alpha(0,0) = \alpha\textbf{y}, \forall \alpha \in \mathbb{R}$$
I know that if we let $\textbf{y} = (1,1)$ and $\textbf{x} = (0,0)$ the statement is true, but if the equality must work for all values of $\textbf{y}$ and $\textbf{x}$, then the instance gives is a counterexample, right?
The statement
does not cover all possibilities for the two vectors to be linearly dependent. It fails precisely when $\mathbf y$ is the zero vector but $\mathbf x$ isn't. So for such a case, the Caychy-Schwarz equality will hold, but the above property doesn't.
Instead, the true characterisation of linear dependence is usually phrased as
This version allows for either of the vectors to be the zero without the other one. And the Cauchy-Schwarz equality will hold iff this holds.