Math equation in latex

equationsmath-mode

hello how can I write this equation in latex?

enter image description here

Best Answer

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.

enter image description here

\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} 
Related Question