# How to vertically align multiple equations with equal signs

How can I vertically align multiple equations with equal signs?

In the following code, the white space before and after the equal symbol in each line is not correctly aligned. Also, the right parts of the equations need to be vertically aligned. Thus, I used lots of \quad and \qquad, but it still needs to be perfectly aligned. Finally, I tried to make a table but was not successful. How can I fix it?

\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}

\sisetup{inter-unit-product=\ensuremath{{}\cdot{}}}

\newenvironment{makebold}{\boldmath\sisetup{detect-all}}{\ignorespacesafterend}

\begin{document}

\begin{makebold}
${10 \log_{10} \frac{\frac{V_1^2}{R}}{\frac{V_0^2}{R}} \quad = \quad 10 \log_{10} \frac{V_1^2}{V_0^2}}$
${\qquad \qquad \qquad \quad \quad= \quad 10 \log_{10} (\frac{V_1}{V_0})^2}$
${\qquad \qquad \quad \quad \quad= \quad 20 \log_{10} \frac{V_1}{V_0}}$
\end{makebold}

\end{document}

• Does this help?overleaf.com/learn/latex/… Commented Dec 31, 2022 at 23:30
• Thank you very much for your comment!
– prko
Commented Dec 31, 2022 at 23:57
• Don't overuse boldface… Commented Jan 1, 2023 at 0:01
• There are times when $a/b$ is much better than $\frac{a}{b}$. Commented Jan 1, 2023 at 18:10

I would use the align* environment, e.g.:

\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}

\sisetup{inter-unit-product=\ensuremath{{}\cdot{}}}

\newenvironment{makebold}{\boldmath\sisetup{detect-all}}{\ignorespacesafterend}

\begin{document}

\begin{makebold}
\begin{align*}
10 \log_{10} \frac{\frac{V_1^2}{R}}{\frac{V_0^2}{R}} &= 10 \log_{10} \frac{V_1^2}{V_0^2}
\\
&= 10 \log_{10} (\frac{V_1}{V_0})^2
\\
&= 20 \log_{10} \frac{V_1}{V_0}
\end{align*}
\end{makebold}

\end{document}


• Thank you very much for your answer!
– prko
Commented Dec 31, 2022 at 23:57