# \cal messes up the math mode

How come when I use this code with beamer

\begin{block}{Misadjustment}
$$\cal{M} = \frac{1-\lambda}{2}\sigma_v^2 M + \frac{1}{2(1-\lambda)}tr[\mathbf{RQ}]$$
\end{block}


results in this:

But when I remove the \cal, the equation is displayed correctly.

-

You need to use \mathcal, which takes an argument, not \cal:

\documentclass{beamer}% http://ctan.org/pkg/beamer
\begin{document}
\begin{frame}
$\mathcal{M} = \frac{1-\lambda}{2}\sigma_v^2 M + \frac{1}{2(1-\lambda)}tr[\mathbf{RQ}]$

The use is similar to your font switching macro \mathbf. Also note the use of $...$ to denote a display math equation rather than the TeX $$...$$ notation. For more on this, see Why is $…$ preferable to ?.