Is there a simple way of drawing matrices with shadowed blocks like the ones in the picture?

I've tried something like Gonzalo Medina's proposal:
%% with these packages loaded
%% \usepackage{tikz}
%% \usetikzlibrary{matrix}
\begin{frame}
\frametitle{Other matrix groups}
\begin{itemize}
\item Upper triangular $UT(p,q)$:
\begin{tikzpicture}[every node/.style={anchor=base,text depth=.5ex,text height=2ex,text width=1em}]
\matrix [matrix of nodes,nodes in empty cells]
{
|[fill=black]| a & |[fill=black]| b \\
|[fill=white]| 0 & |[fill=black]| c \\
};
\end{tikzpicture}
\end{itemize}
\end{frame}
However, I get an error
! Undefined control sequence.
\pgf@matrix@last@nextcell@options
l.307 \end{frame}
nonstop compilation yields
Any suggestions?

left delimiter=(,right delimiter=\}etc. – Mar 25 '15 at 12:40TikZstyle definitions, but I found some simpler examples... so I edit the question because I get an error. – Dox Mar 25 '15 at 12:48ampersand replacement=\&and use\&in the matrix – percusse Mar 25 '15 at 12:51