Centered Column Problem in LATEX

In some of the questions examples you need to construct number columns. In the number columns numbers should be placed symmetrically under each other, so the units would be under units, hundreds under hundreds, tens under tens etc. You can easily do that using Latex. Please note that the operation sign should always be on the left.

 

$$
\begin{matrix}
&9104 \\
&2361 \\
&6226 \\ +
\hline
\end{matrix}
$$

 

 

results in

 

image-1638360736147.png

For more Latex functions, supported in new QUIL, please visit https://katex.org/docs/support_table.html