[Tex/LaTex] Aligning a system of equations

align

I am trying to align three equations in two lines. How can I do it using \begin{align*}?

I want it to look like this:

enter image description here

But mine looks like this:

enter image description here

My code:

\begin{align*}
A^2 &= A, B^2 &= C, C^2 &= B,\\
AB &= B, AC &= C, BC &=A, 
\end{align*}

Best Answer

Quick fix:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
 \begin{align*}
   A^2 &= A, & B^2 &= C, & C^2 &= B,\\
   AB &= B, & AC &= C, & BC &= A,
 \end{align*}
\end{document}
Related Question