Question

How to add labels to the columns and rows (such as a, b, c, d and the like) which go above and to the left (both outside) of the matrix, but are obviously aligned with said columns and rows?

An example matrix:

\[
\begin{pmatrix}
t   & 1-t &  -1 &  0  &  0  \\
0   &  t  & 1-t &  -1 &  0  \\
0   &  0  &  t  & 1-t &  -1 \\
-1  &  0  &  0  &  t  & 1-t \\
1-t &  -1 &  0  &  0  &  t
\end{pmatrix}
\]
Was it helpful?

Solution

You need to use \bordermatrix. There's an example at http://www.math.harvard.edu/texman/node25.html.

OTHER TIPS

You may want to try the kbordermatrix package. Its documentation can be found here (note that the package is not part of CTAN). It is more modern and advanced than good old bordermatrix. An example follows below:

\usepackage{kbordermatrix} % include package @ document preamble
\renewcommand{\kbldelim}{(} % change default array delimiters to parentheses
\renewcommand{\kbrdelim}{)}

% ...

\[
\kbordermatrix{
    \mbox{corner_text}&\alpha & \beta & \gamma & \delta \\ % column indices
    1 & t   & 1-t &  -1 &  0  &  0  \\
    2 & 0   &  t  & 1-t &  -1 &  0  \\
    3 & 0   &  0  &  t  & 1-t &  -1 \\
    4 & -1  &  0  &  0  &  t  & 1-t \\
    5 & 1-t &  -1 &  0  &  0  &  t
    % 1, 2, 3, 4, 5 are row indices
}
\]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top