# How can I get these equations to align in \align?

I have the following code:

\begin{align*}
&[f_2,\phi](a)=0, &&[f_2,\psi](a)=0, &[f_2,\phi](b)=-\beta_2, &&[f_2,\psi](b)=\beta_1.\\
&[f_1,\phi](a)=-\alpha_2, &&[f_1,\psi](a)=\alpha_1, &[f_1,\phi](b)=0, &&[f_1,\psi](b)=0.
\end{align*}


which produces the following

which isnt aligned after the second column. I'd like the alignment to coincide with each ' [ ' . Any ideas on how to line these up?

## 1 Answer

Use an & between each equation, and an & at the aligment point (=) in each equation.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
[f_2,\phi](a)&=0, &[f_2,\psi](a)&=0, &[f_2,\phi](b)&=-\beta_2, &[f_2,\psi](b)&=\beta_1.\\
[f_1,\phi](a)&=-\alpha_2, &[f_1,\psi](a)&=\alpha_1, &[f_1,\phi](b)&=0, &[f_1,\psi](b)&=0.
\end{align*}
\end{document}


If you want the aligment at [ not = that would be less conventional, but keep the & between the equations but move the aligment from &= to &[. The output is unchanged in this case as the left hand sides of each group have the same width.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
&[f_2,\phi](a)=0, &&[f_2,\psi](a)=0, &&[f_2,\phi](b)=-\beta_2, &&[f_2,\psi](b)=\beta_1.\\
&[f_1,\phi](a)=-\alpha_2, &&[f_1,\psi](a)=\alpha_1, &&[f_1,\phi](b)=0, &&[f_1,\psi](b)=0.
\end{align*}
\end{document}


To better see the difference, the two forms, but replacing f_1 and f_2 by variables of different widths: