The slides I'm preparing for a lecture have some big equations. Sometimes I need to break lines inside an align*
environment. But if I use curly brackets in an equation, their sizes are different from one line to another. Look the last two lines in the figure below:
How can I fix it?
Here is a minimal example:
\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}
\newcommand{\Sigmab}{\bm{\Sigma}}
\newcommand{\xb}{\bm{x}}
\newcommand{\mub}{\bm{\mu}}
\begin{document}
\begin{align*}
\widehat{G} &= \arg \max_k P(G = k | X =x) \\
&= \arg \max_k f_k(x)\pi_k \\
&= \arg \max_k \log(f_k(x)\pi_k) \\
&= \arg \max_k \left\{ -\log\left[(2\pi)^{p/2}|\Sigmab|^{1/2}\right] \right. \\
& \left. \hphantom{X} -\frac12 (\xb-\mub_k)' \Sigmab^{-1} (\xb-\mub_k) + \log(\pi_k) \right\}
\end{align*}
\end{document}