# Math equation in latex

hello how can I write this equation in latex? • I would encourage you to learn a bit more about TeX. The beginning steps aren't too bad. The hardest part of this equation is probably getting the k=1 and n in the right location. If that was your problem and everything else was fine, it would have been helpful to say so when you posted your question. Jan 10, 2022 at 13:34
• @Teepeemm sorry about that I will keep that in mind
– 주성우
Jan 10, 2022 at 13:37

Here are two ways to typeset the equation in question. The first replicates the expression in the screenshot you posted. The second uses what I would consider to be a somewhat more standard way of expressing the idea that the minimization takes place over an index k that belongs to the set of integers ranging from 1 to n. \documentclass{article} % or some other suitable document class
\usepackage{amsmath}    % for 'align*' environment
\usepackage{newtxtext,newtxmath} % optional (Times roman fonts)

\begin{document}
\begin{align*}
AB[i,j] &= \min\limits_{k=1}^n (A[i,k]+B[k,j])  \\
AB[i,j] &= \min\limits_{k\in\{1,\dots,n\}} (A[i,k]+B[k,j])
\end{align*}
\end{document}

• Thank you for your help!
– 주성우
Jan 10, 2022 at 13:35

An alternative for \min\limits_{k=1}^n using \DeclareMathOperator*{\mlimi}{\min}.

\documentclass[12pt]{article}
\usepackage{newtxtext,newtxmath}
\DeclareMathOperator*{\mlimi}{\min}
\begin{document}
$AB[i,j]=\mlimi_{k=1}^n (A[i,k]+B[k,j])$
\end{document} It is possible to adjiust (decreasing) the upper and lower limits using \scriptscriptstyle.

\documentclass[12pt]{article}
\usepackage{newtxtext,newtxmath}
\DeclareMathOperator*{\mlimi}{\min}
\begin{document}
$AB[i,j]=\mlimi_{\scriptscriptstyle k=1}^{\scriptscriptstyle n} (A[i,k]+B[k,j])$
\end{document} 