I would like to make something that looks like this:

I don't know how to get the brackets inside the matrix to line up in the right spots. I don't need them to be red; I just added that to emphasize what I want.
Here is what I used to make this (sans red brackets):
\begin{bmatrix} I_p \\ & \ddots \\ && I_p \\ & I_p \\ && \ddots \\ &&& I_p \\ &&& \vdots & \ddots \\ &&& \ddots & \vdots \\ &&&& I_p \\ &&&&& \ddots \\ &&&&&& I_p \end{bmatrix} EDIT: See this followup question for the solution I went with.

