# Modifying spacing inside align

I am trying to type this into LaTeX, but I have difficulties with the spacing between the equalities. This is what I have tried:

Code:

\begin{align*}
6 \times \left( 3+5 \right) &=  6 \times \left( 8 \right) &&= 48\\
6 \times \left( 3+5 \right) &= 6 \times 3 + 6 \times 5 &= 18 + 30 &= 48
\end{align*}


Output: I propose a solution using matrix environment:

\documentclass{article}

\usepackage{amsmath}

\begin{document}
$\begin{matrix} 2\times(8-3)&=&2\times5&=&10,\\ 2\times(8-3)&=&2\times-2\times3&=&16-6&=&10. \end{matrix}$
\end{document} • @R.Morales thank you for accepting my answer! Jan 24, 2019 at 6:30
• The spaces around the = signs are too large. May 9, 2020 at 20:04
• @barbarabeeton bello Barbara!! Nice to hear you again. Thanks for the comment, I realized it some months ago when I talked with David or someone else. The spacing is not correct. May 9, 2020 at 20:38

I think you need to use the alignat environment, which gives you full control on the spacing between alignment columns. See it this code befits you:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{alignat*}{2}
6 \times \left( 3+5 \right) &= 6 \times \left( 8 \right) &&= 48\\
6 \times \left( 3+5 \right) &= 6 \times 3 + 6 \times 5 &= 18 + 30 &= 48
\end{alignat*}

\end{document} • The space before the = after 6 \times 5 is too narrow. This can be rescued by entering it as &{}=. May 25, 2020 at 21:24

Two things:

1. align has a right-left alignment around & while you want some elements to be centred;

2. align inserts a large space between successive & to separate equations.

I'd suggest alignat with some box manipulations thanks to eqparbox: \documentclass{article}

\usepackage{amsmath,eqparbox}

\begin{document}

\begin{alignat*}{2}
2 \times (8 - 3) &=       \eqmakebox[c1]{$2 \times 5$}        &       & \eqmakebox[c2]{}         = 10, \\
2 \times (8 - 3) &= \eqmakebox[c1]{$2 \times 8 - 2 \times 3$} & {}={} & \eqmakebox[c2]{$16 - 6$} = 10.
\end{alignat*}

\begin{alignat*}{2}
6 \times ( 3 + 5 ) &=     \eqmakebox[c3]{$6 \times ( 8 )$}      &       & \eqmakebox[c4]{}           = 48, \\
6 \times ( 3 + 5 ) &= \eqmakebox[c3]{$6 \times 3 + 6 \times 5$} & {}={} & \eqmakebox[c4]{$18 + 30$} = 48.
\end{alignat*}

\end{document}


\eqmakebox[<tag>][<align>]{<stuff>} aligns all <stuff> (set in text mode) with the same <tag> according to the specified <align>ment (default is centre, otherwise it can be left or right).

\begin{tabular}{llll} 6 $\times$ ( 3+5 ) & = 6 $\times$ ( 8 ) & &= 48\ 6 $\times$ ( 3+5 ) & = 6 $\times$ 3 + 6 $\times$ 5 &= 18 + 30 &= 48 \end{tabular} How about trying this? \left( and \right) are in math mo

• With this solution the sapces around the = will be uneven. May 2, 2020 at 10:40
• What does "\left( and \right) are in math mo" refer to? May 2, 2020 at 10:41
\begin{tabular}{lllllll}
6 $\times$ ( 3+5 ) & = & 6 $\times$ ( 8 ) & = &&=& 48\\
6 $\times$ ( 3+5 ) & = &6 $\times$ 3 + 6 $\times$ 5 &= &18 + 30 &=& 48\\
\end{tabular}


I added extra tabular columns for each = sign to improve according to your suggestions. When we write maths equations we use $$ and $$. In normal text one need not have back slashes for these brackets. For brackets [], and { } one had to use back slashes, because these brackets are a part of commands. You can test this sentence, "Here I am writing (good news) that we are safe. But quarantine is creating [tension] and {health problems}." Please feel free to comment on it.

• Is this an extension to your previous answer? If so, why don't you edit said previous answer instad of adding a new one? May 9, 2020 at 15:27
\begin{tabular}{clcc}
$6 \times \left( 3+5 \right)$ & $= 6 \times \left( 8 \right)$ &&= 48\\
$6 \times \left( 3+5 \right)$ & $= 6 \times 3 + 6 \times 5$&$= 18 + 30$ &= 48
\end{tabular}


You can try this. This looks better than align.