# Printing matrix labels below it [duplicate]

This question already has an answer here:

So i created a matrix in latex using the code:

\usepackage{kbordermatrix}
\usepackage{blkarray
\renewcommand{\kbldelim}{(}% Left delimiter
\renewcommand{\kbrdelim}{)}% Right delimiter
$\kbordermatrix{ & a & b & c & d\\ a & 2173.00 & 354.00 & 0.00 & 1249.00 \\ b & 0.00 & 3772.00 & 52.00 & 0.00 \\ c & 474.00 & 469.00 & 2858.00 & 42.00 \\ d & 1262.00 & 303.00 & 39.00 & 2180.00\\ }$


The above code is taken from here The output matrix which I got is this:

My doubt lies in my next task. I want to put a row of labels below my matrix like:

How can i achieve this?

Thanks.

## marked as duplicate by Werner, Ronny, Maarten Dhondt, Andrew Swann, MenschOct 3 '16 at 8:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• From the kbordermatrix docs: I also have an experimental version that will put the labels on the right and bottom. If you ask, I will make it available. I might even try to make a version that lets you specify the layout, but I am content with top and left. – percusse Oct 2 '16 at 22:45
• @percusse It would be really helpful if you can make it available. I need the labels below the matrix – Jishan Oct 2 '16 at 22:47
• percusse is only quoting from the documentation, but is not the author. You have to contact Kim C Border, kcb@caltech.edu – gernot Oct 2 '16 at 23:08

## 1 Answer

With blockarray the parentheses have a tendency to be too small, but it's easy to coerce them to be a bit larger.

\documentclass{article}
\usepackage{amsmath,blkarray}

\begin{document}

$\begin{blockarray}{ccccc} \begin{block}{c(cccc)} a & 2173.00 & 354.00 & 0.00 & 1249.00\smash[b]{\vphantom{\Big|}} \\ b & 0.00 & 3772.00 & 52.00 & 0.00 \\ c & 474.00 & 469.00 & 2858.00 & 42.00 \\ d & 1262.00 & 303.00 & 39.00 & 2180.00\smash[t]{\vphantom{\Big|}}\\ \end{block} & a & b & c & d \end{blockarray}$

\end{document}