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?

• 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
• 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. May 30 '21 at 17:40
• As an aside, it is wrong to end the last equation with \\ . May 30 '21 at 17:55

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}