I am trying to define a matrix in segments by enclosing the entries of the matrix in boxes, and also using the open and closed braces to label those segments. So far I have developed the following code to do this.
\documentclass[a4,12pt]{report}
\usepackage{multirow}
\begin{document}
\[
A =
\left(
\begin{array}{rrrrrl}
\cline{2-4} \cline{5-5}
\multirow{2}{*}{$B \{$} &
\multicolumn{1}{|r}{1} & 2 & \multicolumn{1}{r|}{-4} & \multicolumn{1}{|r|}{1} & \multirow{2}{*}{$\} \hat{\mathbf{b}}^{T}$} \\
& \multicolumn{1}{|r}{2} & -5 & \multicolumn{1}{r|}{-3} & \multicolumn{1}{|r|}{-3} & \\
\cline{2-4} \cline{5-5}
\hat{\mathbf{c}} \{ & \multicolumn{1}{|r}{-6} & -3 & \multicolumn{1}{r|}{0} & \multicolumn{1}{|r|}{5} & \} a_{n-1,n} \\
\cline{2-4} \cline{5-5}
\hat{\mathbf{d}} \{ & \multicolumn{1}{|r}{-6} & 7 & \multicolumn{1}{r|}{0} & \multicolumn{1}{|r|}{-8} & \} a_{n,n} \\
\cline{2-4} \cline{5-5}
\end{array}
\right)
\]
\end{document}
This produces the following output:

What I want to do is expand the left and right brace in the first and last columns to line up with the rows that have been segmented. One way of doing this is to use the \left\{ and \right\} LaTeX commands. The problem is that when I do this, I get the following LaTeX error:
! Missing \right. inserted.
<inserted text>
\right .
l.12 \multirow{2}{*}{$B \left\{$}
&
?
Also, what I would like to do is separate the segments using individual boxes, rather than adjoining boxes as above. Any ideas on how to do this would be very much appreciated.



blkarray. – Marco Daniel Apr 20 '12 at 13:07tikzfor the boxing? – cmhughes Apr 20 '12 at 13:26tikzfor some of the lattice graphs. – Bill Apr 20 '12 at 13:51arraypackage provides the command\extrarowheightto make adjustments of this sort; alternatively, a\vphantom{...}with some suitable content (maybe$\hat X$) could be applied in the rows that need it. – barbara beeton Apr 20 '12 at 14:00