I have created a matrix that I would like to label. However, I would like to have the labels on the smallmatrix environment rather than using an array as I have done in order to get labels into the matrix. Below I show both the labeled matrix and the size difference relative to the smallmatrix environment.
\documentclass[12pt]{article}%
\usepackage{amsmath}
\usepackage{blkarray}
\begin{document}
\[
\begin{blockarray}{ccccccc}
& A & B & C & D & E & F \\
\begin{block}{c[cccccc]}
A & 0 & 1 & 1 & 1 & 1 & 1 \\
B & 1 & 0 & 1 & 1 & 1 & 1 \\
C & 1 & 1 & 0 & 1 & 1 & 1 \\
D & 1 & 1 & 1 & 0 & 1 & 1 \\
E & 1 & 1 & 1 & 1 & 0 & 1 \\
F & 1 & 1 & 1 & 1 & 1 & 0 \\
\end{block}%
\end{blockarray}%
\]
\[
\left[
\begin{smallmatrix}
0 & 1 & 1 & 1 & 1 & 1 \\
1 & 0 & 1 & 1 & 1 & 1 \\
1 & 1 & 0 & 1 & 1 & 1 \\
1 & 1 & 1 & 0 & 1 & 1 \\
1 & 1 & 1 & 1 & 0 & 1 \\
1 & 1 & 1 & 1 & 1 & 0 \\
\end{smallmatrix}%
\right]
\]
\end{document}
@{}
in the definition of the array (ex:\begin{blockarray}{c@{}c}
) reduces the horizontal distance. I am still unsure how to shrink the vertical distances though. This may also not be the most efficient way to solve this issue either.