I have the following code
\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}
\begin{tikzpicture}[yscale=1,
brace/.style={thick,decorate,
decoration={calligraphic brace, amplitude=7pt,raise=0.5ex}}]
\draw (0,0) coordinate (O) rectangle (9,3) coordinate (TR)
(3,3) coordinate (T) -- (3,0) coordinate (B) -- (0,3)
coordinate (TL)
(0.4,0.4) node[above right,font=\Huge]{$\mathbf{0}$};
\draw[brace] (O) -- node[left=1.5ex]{$I_n^2$} (TL);
\draw[brace] (TL) -- node[above=1.5ex]{$I_n^2$} (T);
\draw[brace] (T) -- node[above=1.5ex]{$I_n^1$} (TR);
\end{tikzpicture}
\end{document}
and its output
Could you please help me edit this code to achieve two below variants? This is the last part of my thesis. Thank you so much for your help!
and