# Matrix Equation Text over text in braces Hi, how can I write this equation in Latex?

• And why not simply write it like this: [X]_{M\times N} = [U]_{M\times M}[S]_{M\times N}[V]_{N\times N}? – AboAmmar Jan 6 '18 at 17:42
• Welcome to TeX.SX! – Bobyandbob Jan 6 '18 at 17:45
• Could you explain the notation of M and N in the (vertical) middle? What's the difference between that and the superscript T? – Werner Jan 6 '18 at 18:23
• @Werner I guess the T stands for transposed. The formula looks a bit like a Smith normal form. – user121799 Jan 6 '18 at 19:29
• @AboAmmar: I agree. Perhaps this. – Werner Jan 6 '18 at 19:48

Never seen this kind of formula, so I don't know if this exactly what you want to achieve:

\documentclass{article}
\usepackage{amsmath}
\newcommand{\mymatr}{\big[\overset{\scriptscriptstyle #1}{#2}\big]}
\newcommand{\myind}{\raisebox{1pt}{$\scriptscriptstyle #1$}}
\begin{document}
$\mymatr{N}{X}\myind{M}= \myind{M}\mymatr{M}{U}\mymatr{N}{S}\myind{M} \mymatr{N}{V}^{T}\myind{N}$
or
$\mymatr{N}{X}\myind{M}= \myind{M}\mymatr{M}{U}\mymatr{N}{S}\myind{M} \mymatr{N}{V}^{\scriptscriptstyle T}\myind{N}$
\end{document} 