# How can I line up an equation with the equals sign from another equation?

I have the following code.

\begin{align*}
H([(1,0,0)], [(1,0,1)]) &= \min{}\{ &|(1 - 0) - (1 - 1)| + |(0 - 0) - (0 - 1)|, \\
&|(1 - 0) - (1 - 0)| + |(0 - 0) - (1 - 0)|, \\
&|(0 - 1) - (0 - 1)| + |(0 - 1) - (1 - 1)| \}
\end{align*}
\begin{equation*}
= \min{(2,1,1)} = 1
\end{equation*}


This produces an environment where my absolute values are nice and aligned exactly the way I want them, and one separate equation. Is there a way I can make the equals sign in the second equation line up with the equals sign in the align environment?

I guess you want to nest aligned:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
H([(1,0,0)], [(1,0,1)])
&= \min\{
\begin{aligned}[t]
&|(1 - 0) - (1 - 1)| + |(0 - 0) - (0 - 1)|, \\
&|(1 - 0) - (1 - 0)| + |(0 - 0) - (1 - 0)|, \\
&|(0 - 1) - (0 - 1)| + |(0 - 1) - (1 - 1)| \}
\end{aligned}\\
&= \min\{2,1,1\} = 1
\end{align*}

\end{document}


• Thank you! This is exactly what I wanted. – wz-billings Dec 11 '19 at 23:02
• Shouldn't \lvert and \rvert be used instead of | |? – L. F. Dec 12 '19 at 11:17
• @L.F. Yes, but in this case the simplified input is good. – egreg Dec 12 '19 at 11:56
• I’m a bit confused. In which cases the simplified input produces the desired result? – L. F. Dec 12 '19 at 13:01