# How to align two sets of equation separated by some text in a beamer slide?

I want to align the two set of equations on same slide.

I found a similar post How to align a set of multiline equations but there the equations do not involve text as in this case

Here is my MWE

\documentclass{beamer}
\usepackage[english]{babel}

\begin{document}
\begin{frame}
\frametitle {MWE:Align two set of equations}
\begin{center}
\begin{align*}
\sigma^2&=(a+b)^2-(a+c)^2 \\
&=(a^2+b^2-2ab)-(a^2+c^2-2ac)
\end{align*}
\end{center}
Cancel out common terms, then
\begin{center}
$$\sigma^2= b^2-c^2+2(ac-ab)$$
\end{center}
\end{frame}
\end{document}


Green arrow shows where I would like my eq 2 to appear.

• Why have you included tikz? – cfr Jun 16 '16 at 0:44
• By mistake....Edited it. – NAASI Jun 16 '16 at 15:18

amsmath provides \intertext{} for this kind of purpose. For example,

\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\frametitle {MWE:  Align two set of equations}
\begin{align*}
\sigma^2&=(a+b)^2-(a+c)^2 \\
&=(a^2+b^2-2ab)-(a^2+c^2-2ac)\\
\intertext{Cancel out common terms, then}
\sigma^2&= b^2-c^2+2(ac-ab)
\end{align*}
\end{frame}
\end{document}