Align Alignment – How to Vertically Align Multiple Equations with Equal Signs

alignalignment

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}

Best Answer

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}

enter image description here