# Centering equations under align

I'm trying to display two equations side by side and then display a third one centred between both on the next line. I'm using the align environment. Here's what I've tried

\begin{align*}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} &   & L=4\times d_{\text{c-c}}=5.64\si{\angstrom}\\
&E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}&\\
\end{align*}


How can I correctly display these?

## 2 Answers

There are a number of ways of achieving this:

\documentclass{article}

\usepackage{amsmath,siunitx}

\begin{document}

Using \verb|align*|:
\begin{align*}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
& E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}
\end{align*}

Using \verb|gather*| (1):
\begin{gather*}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} \qquad L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}
\end{gather*}

Using \verb|gather*| (2):
\begin{gather*}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} \quad
\phantom{E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}} \quad
L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
\phantom{E_n = \frac{n^2h^2}{8m_{e^{-}}L^2}} \quad
E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2} \quad
\phantom{L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom}}
\end{gather*}

Using \verb|alignat*|:
\begin{alignat*}{3}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
& \quad E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2} \quad
\end{alignat*}

Using an \verb|array|:
\begin{equation*}
\renewcommand{\arraystretch}{2}
\begin{array}{ *{3}{c} }
\displaystyle E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L = 4 \times d_{\text{c-c}} = 5.64\si{\angstrom} \\
& \displaystyle E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}
\end{array}
\end{equation*}

\end{document}


You can use the alignat environment:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} % Fontencoding: 7bit -> 8bit
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
E_n = \frac{n^2h^2}{8m_{e^{-}}L^2} & & L=4\times d_{\text{c-c}}=5.64\\
&E_1 = \frac{1^2h^2}{8m_{e^{-}}5.46^2}&
\end{alignat*}
\end{document}


Note, however, this will place the equation below in between the gap of the two above. It doesn't really center it. Especially, if the equation is long, there will be much space between the first equations.