0

I have written these list of equations:

\begin{align*}
    (\frac{p}{q})^2 &= 2\\
    \frac{p^2}{q^2} &= 2\\
                p^2 &= 2q^2\\
\end{align*}

They all line up but the left hand side of the first equation doesn't line up exactly with the other two, which looks off to me. Any way to fix this?

Also, I'd like to have the first equation and third equation be numbered (1), (2), respectively. I know using \align will number all the equations but I only want the first and third equation numbered. How would I do this?

3
  • 1
    the left hand sides are right aligned towards the = so the left edge reflects the length of the expression. It isn't clear what output you want. for the numbering question use \notag on the unnumbered lines. May 30 '21 at 17:36
  • 1
    For the numbers, you can use align and use \notag in the second equation. The alignment problem, in my opinion, comes mainly from the parentheses. It is possible to have a better alignment, but what exactly do you want to align? Further, I'm not sure it is recommendable, æsthetically.
    – Bernard
    May 30 '21 at 17:40
  • As an aside, it is wrong to end the last equation with \\ .
    – Skillmon
    May 30 '21 at 17:55
1

enter image description here

I'm not sure I like the manually adjusted version but...

\documentclass{article}

\usepackage{amsmath}

\begin{document}

Original
\begin{align}
    (\frac{p}{q})^2 &= 2\\
    \frac{p^2}{q^2} &= 2\notag\\
                p^2 &= 2q^2
\end{align}

Bigl
\begin{align}
    \Bigl(\frac{p}{q}\Bigr)^2 &= 2\\
    \frac{p^2}{q^2} &= 2\notag\\
                p^2 &= 2q^2
\end{align}

Adjusted
\begin{align}
    \Bigl(\frac{p}{q}\Bigr)^{\mspace{-4mu}2}\mspace{-3mu} &= 2\\
    \frac{p^2}{q^2} \mspace{5mu}&= 2\notag\\
                p^2 \mspace{5mu}&= 2q^2
\end{align}


\end{document}

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.