# Operation with continued fraction

Using this code

b\cdot[0;a_1,a_2,a_3,\cdots]=\cfrac{b}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\cdots}}}=
\cfrac{1}{\cfrac{1}{b}  \left[a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\cdots}} \right ]}


to represent an operation with continued fraction, I obtained the result in the image.

Is it possible to reduce the space under the first fraction line in the final fraction?

Just use a bmatrix environment in the denominator:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$b\cdot[0;a_1,a_2,a_3,\cdots]=\cfrac{b}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\cdots}}}= \cfrac{1}{\cfrac{1}{b} \begin{bmatrix} a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\cdots}} \end{bmatrix}}$
\end{document}


A more compact solution:

$[0;a_1,a_2,a_3,\cdots]=\frac{b}{a_1+\frac{1}{a_2+\frac{1}{a_3+\cdots}}}=\frac{1}{\frac{1}{b}\big[a_1+\frac{1}{a_2+\frac{1}{a_3+\cdots}}\big]}$