1

I am trying to align text vertically in the denominator of a fraction, analogous to a new line or line break. I have tried using the matrix environment

\begin{equation*}
p(a\mid b)=\frac{1}{\begin{matrix}\operatorname{sigma}(n/10)^{10}&\\n=0\ \text{to}\ 10\end{matrix}}=\frac{1}{0+.1^{10}+.2^{10}+\ldots+1}=1 / 1.49=.67
\end{equation*}

enter image description here

and the \splitfrac command from the mathtools package.

\begin{equation*} 
p(a\mid b)=\frac{1}{\splitfrac{\operatorname{sigma}(n/10)^{10}}{n=0\ \text{to}\ 10}}=\frac{1}{0+.1^{10}+.2^{10}+\ldots+1}=1 / 1.49=.67 
\end{equation*}

enter image description here

Neither works. The reason they do not work is because I do not want pointless empty space before "n = 0" and below the vinculum. I want it to look like it does in the mockup below. enter image description here

1
  • sigma ? isn't it sum or use math symbol for summation \sum\limits_{n=0}^{n} ?
    – Zarko
    Commented Apr 16, 2023 at 9:35

1 Answer 1

1

The mathtools package provides a matrix* environment, which generalizes the matrix environment of the amsmath package to allow [l] and [r] positioning arguments.

enter image description here

\documentclass{article} % or some other suitable document class
\usepackage[T1]{fontenc}
\usepackage{mathtools} % for 'matrix*' env.
\begin{document}
\begin{equation*}
p(a\mid b)=\frac{1}{
  \begin{matrix*}[l] % perform left alignment
    \mathrm{sigma}(n/10)^{10}\\
    n=0,\dots,10
  \end{matrix*}}
= \frac{1}{0+0.1^{10}+0.2^{10}+\dots+1} = 1 / 1.49 = 0.67
\end{equation*}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .