2

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?

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

| improve this answer | |
  • 1
    +1. One may replace all instances of {}={} with =, though. – Mico Sep 28 at 2:17

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.