5

I am trying to type this into LaTeX, but I have difficulties with the spacing between the equalities. enter image description here

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:

enter image description here

I would really appreciate any help you can provide.

2

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}

Solution using matrix environment

3
  • 2
    @R.Morales thank you for accepting my answer! – manooooh Jan 24 '19 at 6:30
  • 1
    The spaces around the = signs are too large. – barbara beeton May 9 '20 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. – manooooh May 9 '20 at 20:38
6

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} 

enter image description here

1
  • The space before the = after 6 \times 5 is too narrow. This can be rescued by entering it as &{}=. – barbara beeton May 25 '20 at 21:24
4

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:

enter image description here

\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).

0

\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

2
  • With this solution the sapces around the = will be uneven. – leandriis May 2 '20 at 10:40
  • What does "\left( and \right) are in math mo" refer to? – leandriis May 2 '20 at 10:41
0
\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.

1
  • Is this an extension to your previous answer? If so, why don't you edit said previous answer instad of adding a new one? – leandriis May 9 '20 at 15:27
0
\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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.