I am reading a textbook on statists by Freedman, Pisani, and Purves. In one of the chapters about correlation between two variables, it is given that the vertical distance of a typical point from the standard deviation line (say $s_v$) on a scatter plot is, $s_v=\sqrt{2(1-|r|)} \times \sigma_v$, where $r$ is the correlation coefficient, and $\sigma_v$ is the vertical standard deviation.
How to work out this formula mathematically? I thought about working it out from the slope of the SD line, or formula for $r$ but I can't seem to work it out or find a hint/solution online. It's not a homework problem it's a sort of technical footnote.
It is also mentioned that there are similar formulas for the horizontal direction. Is $s_h=\sqrt{2(1-r)} \times \sigma_h$, the formula for the horizontal distance? If not, what will it be?