I am trying to write a matrix with indices given to the rows and columns. I get the error "Misplaced \noalign." Does anybody understand why? The minimal example is below.
\documentclass{minimal}
\usepackage{blkarray}
\begin{document}
\[
\begin{blockarray}{ccccc}
& A & B & C & D\\
\begin{block}{c[cccc]}
A & 1 & 1 & 1 & 1\\
B & 1 & 0 & 0 & 1\\
C & 1 & 0 & 1 & 1\\
D & 1 & 1 & 1 & 0
\end{block}
\end{blockarray}
\]
\end{document}

\\in the block. – egreg Nov 10 '11 at 15:13