# 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

\documentclass{article}
\newcommand{\myind}[1]{\raisebox{1pt}{$\scriptscriptstyle #1$}}
$\mymatr{N}{X}\myind{M}= \myind{M}\mymatr{M}{U}\mymatr{N}{S}\myind{M} \mymatr{N}{V}^{T}\myind{N}$
$\mymatr{N}{X}\myind{M}= \myind{M}\mymatr{M}{U}\mymatr{N}{S}\myind{M} \mymatr{N}{V}^{\scriptscriptstyle T}\myind{N}$