0

hello how can I write this equation in latex?

enter image description here

2
  • 4
    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.
    – Teepeemm
    Commented Jan 10, 2022 at 13:34
  • 1
    @Teepeemm sorry about that I will keep that in mind
    – 주성우
    Commented Jan 10, 2022 at 13:37

2 Answers 2

3

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} 
1
  • 2
    Thank you for your help!
    – 주성우
    Commented Jan 10, 2022 at 13:35
1

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}

enter image description here

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}

enter image description here

You must log in to answer this question.

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