How I get this equation with vertical arrows that help describe some of its terms?
\begin{equation*}
0 \leq F = \underbrace{\sum\limits_{i=1}^{n}(y_i - \overline{y})^2}_{(n-1)s_y^2}
- 2b \underbrace{\sum\limits_{i=1}^{n}(x_i - \overline{x})(y_i - \overline{y})}_{(n-1)s_{xy} = (n-1)rs_xs_y}
+b^2 \underbrace{\sum\limits_{i=1}^{n}(x_i - \overline{x})^2}_{(n-1)s_x^2}
\end{equation*}
Best Answer
The command
\uparrow
makes an extensible arrow.The strange braces can be easily explained:
\underbrace
makes an Op atom, which conflicts with the spacing of binary operations, so it's best to brace it. However, if\sum
is preceded by an ordinary symbol, a thin space should appear, which is produced by the empty subformula{}
inside\underbrace
when necessary.The second display shows the standard spacing without
\underbrace
and the arrows, just for checking the spaces are the same.The
\vertarrowbox
has an optional argument for the desired height of the arrow, default 6ex. Call it as\vertarrowbox[12ex]{<symbol>}{<text>}
if you want to double the height (its size should depend on context).