# Difference between {align} and {aligned}[t]

When I use {align*}, it shifts the expressions on the right of the = to the far right of the equation. But when I use {aligned}[t] it works normally. The following is the code:

\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{align*}
x + 3y + 4z &=& 2\\
3y - 4z &=& 5\\
3 &=& 4
\end{align*}\\
\! \begin{aligned}[t] x + 3y + 4z &=& 2\\ 3y - 4z &=& 5\\ 3 &=& 4 \end{aligned}
\end{document}


I've searched this question but the answers are usually about other ways of writing it without explanation. So what is the purpose of \!, [t] and how is aligned different from align?

• Single & is marking the alignment, not two around =, remove the latter one on each line Commented Nov 14, 2017 at 6:58
• align is a full math display, aligned is just an alignment building block. Commented Nov 14, 2017 at 7:19
• your aligned version doesn't work normally as you show in the image it is also setting the = with incorrect spacing and the right hand side is also flush right (but hard to see as you just have single digits) Commented Nov 14, 2017 at 8:54

You're using the environments incorrectly. Here's how you could (should...) use them:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
x + 3y + 4z &= 2 \\
3y - 4z &= 5 \\
z &= 4
\end{align*}

\begin{aligned}[t] x + 3y + 4z &= 2 \\ 3y - 4z &= 5 x &= 4 \end{aligned}

\end{document}


Some things to note:

• The alignment around the relation = is made using a single & on the left. This differs from the eqnarray usage of & other both sides of the relation.

• align* sets an unnumbered alignment that is always centred with respect to the text block.

• aligned sets a block with a similar interface to align* that can be used as inline math or within a display setting. The optional parameter allows you to specify a vertical alignment parameter with respect to the surrounding content. As an example, see

Before
\begin{aligned}[t] a &= b \\ c &= d \end{aligned}
between
\begin{aligned} a &= b \\ c &= d \end{aligned}
after
\begin{aligned}[b] a &= b \\ c &= d \end{aligned}
end.

• Is there a document mentioning the parameter of aligned? Commented Oct 2, 2022 at 16:10
• @IvanaGyro: See p 9 of the amsmath User Guide: "Like the array environment, these -ed variants also take an optional [t], [b] or the default [c] argument to specify vertical positioning."
– Werner
Commented Oct 3, 2022 at 19:28
• Thank you for providing this information. Commented Oct 4, 2022 at 17:45