this is really the same as david's answer, but is prettied up a bit:

\documentclass{article} \usepackage{mathtools} \begin{document} \[ D = \begin{pmatrix} \;D_1 & 0 & 0 & & & \\[-.5ex] 0 & \clap{$\ddots$} & & & \raisebox{-1ex}{\huge 0} & \strut\enspace \\[4pt] 0 & 0 & D_n & & & \\ \multicolumn{3}{c}{$\upbracefill$}&\ &\\ \multicolumn{3}{c}{\scriptstyle n}&\\ & & & & \\ & \textrm{\huge 0} & & & \textrm{\huge 0} & \\ \multicolumn{6}{c}{$\upbracefill$}\\ \multicolumn{6}{c}{\scriptstyle N}\\ \noalign{\vspace{-2\normalbaselineskip}} \end{pmatrix} \vspace{2\normalbaselineskip} \] \end{document}