3

I want to use alignat with these equations. I tried

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \begin{alignat*}{4}
    \sqrt{75} &{}={} \sqrt{3\cdot 25} &{}={} \sqrt{3\cdot 5^2} &{}={} 5\sqrt{3},\\
    \sqrt{147} &{}={} \sqrt{3\cdot 49} &{}={} \sqrt{3\cdot 7^2} &{}={} 7\sqrt{3},\\
    \sqrt{300} &{}={} \sqrt{3\cdot 100} &{}={} \sqrt{3\cdot 10^2}  &{}={} 10\sqrt{3}.
    \end{alignat*}
\end{document}

I got

enter image description here

How can I make it line up more correctly?

Thruston
  • 42,268

1 Answers1

7

I just converted 2 columns from & separators to &&, in order to force left alignment of those columns.

And, as Mico generously added, all occurrences of {}={} can be replaced with =.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \begin{alignat*}{4}
    \sqrt{75} &= \sqrt{3\cdot 25} &&= \sqrt{3\cdot 5^2} &&= 5\sqrt{3},\\
    \sqrt{147} &= \sqrt{3\cdot 49} &&= \sqrt{3\cdot 7^2} &&= 7\sqrt{3},\\
    \sqrt{300} &= \sqrt{3\cdot 100} &&= \sqrt{3\cdot 10^2}  &&= 10\sqrt{3}.
    \end{alignat*}
\end{document}

enter image description here