Possible Duplicate:
bordermatrix with blocks
I need to put a vertical line between two columns of a matrix in \bordermatrix. I know how to do it in the array environment, but \bordermatrix isn't the same. Does anyone know how?
Possible Duplicate:
bordermatrix with blocks
I need to put a vertical line between two columns of a matrix in \bordermatrix. I know how to do it in the array environment, but \bordermatrix isn't the same. Does anyone know how?
\documentclass{article}
\def\VR{\kern-\arraycolsep\strut\vrule &\kern-\arraycolsep}
\def\vr{\kern-\arraycolsep & \kern-\arraycolsep}
\begin{document}
$\bordermatrix{
& 0 & 1 & 2 \cr
0 & A & B & C \cr
1 & d & e & f \cr
2 & 1 & 2 & 3 }$
%
$\bordermatrix{
& 0 & \vr 1 & 2 \cr
0 & A & \VR B & C \cr
1 & d & \VR e & f \cr
2 & 1 & \VR 2 & 3 }$
\end{document}

You can use the package kbordermatrix. You need to install manually because this package is not in TL or CTAN. The documentation is inside the package.

Complete code
\documentclass[11pt]{scrartcl}
\usepackage{kbordermatrix}
\begin{document}
\kbordermatrix{\mbox{indices}&
1&2&\vrule&3&4\\
1&M_{1,1}&M_{1,2}&\vrule&M_{1,3}&M_{1,4}\\
2&M_{2,1}&M_{2,2}&\vrule&M_{2,3}&M_{2,4}
}
\end{document}