When is $F(x) = P(X \leq x) = P(X^2 \leq x^2)$ true, where $F$ is the cumulative distribution function, $P$ is a measure, $X$ is a r.v. and $x$ a real number? Why is the condition $P(X \leq 0) = 0$ apparently necessary for the equality $P(X \leq x) = P(X^2 \leq x^2)$ to be true? Of course, $F(x) = P(X \leq x)$ is true by definition.

Apparently, $x^2 \leq y^2 \iff x \leq y$, for $x, y \in \mathbb{R}$, only if $x, y >= 0$, but this does not really explain that necessary condition. If they are both negative, that $\iff$ does not hold. Here's a simple counter-example. Let $x = -1$ and $y=-2$, then $(-1)^2 \leq (-2)^2 \iff -1 \leq -2$ is not true.

Maybe a good answer would also explain the notation $X \leq x$ in $P(X \leq x)$ and provide a precise definition of a random variable, which is actually a function (so $X \leq x$ should not make much sense, given that a function cannot be smaller or equal to a number).