1

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

enter image description here

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!

enter image description here

and

enter image description here

5

This is an almost exact copy of my previous answer, with many similar posts existing on this site. One can decorate some paths with braces, draw some rectangles, and combine x and y components of coordinates a la https://tex.stackexchange.com/a/401429.

\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}

\begin{tikzpicture}[yscale=0.7,
    brace/.style={thick,decorate,
        decoration={calligraphic brace, amplitude=7pt,raise=0.5ex}}]
\draw (0,0) coordinate (TL) rectangle (6,-4.5)  coordinate (BR)
    (TL) rectangle (3,-3)  coordinate (br)
    (TL) -- (br)
    (0.4,0.4-3) node[above right,font=\Huge]{$\mathbf{0}$};
 \draw[brace] (BR-|TL)  -- node[left=1.5ex]{$K$} (br-|TL);
 \draw[brace] (br-|TL)  -- node[left=1.5ex]{$I$} (TL);
 \draw[brace] (TL)  -- node[above=1.5ex]{$I$} (br|-TL);
 \draw[brace] (br|-TL)  -- node[above=1.5ex]{$J$} (BR|-TL);
\end{tikzpicture}

\bigskip

\begin{tikzpicture}[yscale=0.7,
    brace/.style={thick,decorate,
        decoration={calligraphic brace, amplitude=7pt,raise=0.5ex}}]
\draw (0,0) coordinate (TL) rectangle (4.5,-4.5)  coordinate (BR)
    (TL) rectangle (3,-3)  coordinate (br)
    (TL-|BR) rectangle (7.5,-4.5)  coordinate (BRR)
    (TL) -- (br)
    (0.4,0.4-3) node[above right,font=\Huge]{$\mathbf{0}$};
 \draw[brace] (BR-|TL)  -- node[left=1.5ex]{$J$} (br-|TL);
 \draw[brace] (br-|TL)  -- node[left=1.5ex]{$I$} (TL);
 \draw[brace] (TL)  -- node[above=1.5ex]{$I$} (br|-TL);
 \draw[brace] (br|-TL)  -- node[above=1.5ex]{$J$} (BR|-TL);
 \draw[brace] (BR|-TL)  -- node[above=1.5ex]{$K$} (BRR|-TL);
\end{tikzpicture}

\end{document}

enter image description here

| improve this answer | |
  • 1
    Thank you so much for your help! This is exactly what I intend. Asking multiple similar questions is very annoying, but I have no choice because learning Tikz is not easy and my thesis is near the deadline :(( – LAD Jun 16 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.