I want to create a kbordermatrix with an underbrace and some text below. I tried it with
\documentclass{scrartcl}
\usepackage{kbordermatrix}
\begin{document}
\[
\underbrace{
\kbordermatrix{
& 1 & 2 \\
1 & a & b \\
2 & c & d
}}_{test}
\]
\end{document}
which gave me this output:
As you can see the underbrace also goes below the rowlabels since they are treated as an extra column. Is there a way of using an underbrace which is only below the actual matrix?

2 & \tikzmark{lower1}c & d\tikzmark{lower2}... . Or the last example of http://latex.org/know-how/508-latex-tricks-xv – Bobyandbob Nov 11 '17 at 17:09\usepackage{kbordermatrix} \begin{document}
[ \kbordermatrix{ & 1 & 2 \ 1 & a & b \ 2 & \tikzmark{lowerT1}c & d\tikzmark{lowerT2} } ]
\begin{tikzpicture}[overlay, remember picture,decoration={brace,amplitude=5pt}] \draw[decorate,thick] (lowerT2.south) -- (lowerT1.south) node [midway,below=5pt] {Test}; \end{tikzpicture} \end{document}`
– Bobyandbob Nov 11 '17 at 17:28