I got the following partitioned matrix
through this tikz code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,decorations.pathreplacing, calc, positioning}
\begin{document}
% Matrix U with its Column and Row variances
\begin{center}
\begin{tikzpicture}
\matrix [matrix of math nodes] (eqU) {
\mathbf{U}= \\
};
\matrix [right=2pt of eqU, matrix of math nodes,left delimiter=[,right delimiter={]},row sep=0.2cm,column sep=0.2cm] (U) {
u_{1}^{\left(1\right)} & \ldots & u_{1}^{\left(j\right)} & \ldots & u_{1}^{\left(t\right)}\\
\vdots & \ddots & \vdots & \ddots & \vdots\\
u_{k}^{\left(1\right)} & \ldots & u_{k}^{\left(j\right)} & \ldots & u_{k}^{\left(t\right)}\\
\vdots & \ddots & \vdots & \ddots & \vdots\\
u_{r}^{\left(1\right)} & \ldots & u_{r}^{\left(j\right)} & \ldots & u_{r}^{\left(t\right)} \\
};
\draw[color=red] (U-1-1.north west) -- (U-1-1.north east) -- (U-5-1.south east) -- (U-5-1.south west)-- (U-1-1.north west);
\draw[color=red] (U-1-3.north west) -- (U-1-3.north east) -- (U-5-3.south east) -- (U-5-3.south west)-- (U-1-3.north west);
\draw[color=red] (U-1-5.north west) -- (U-1-5.north east) -- (U-5-5.south east) -- (U-5-5.south west)-- (U-1-5.north west);
\draw[color=blue, dashed] (U-1-1.north west) -- (U-1-5.north east) -- (U-1-5.south east) -- (U-1-5.south west)-- (U-1-1.south west);
\draw[color=blue, dashed] (U-3-1.north west) -- (U-3-5.north east) -- (U-3-5.south east) -- (U-3-5.south west)-- (U-3-1.south west);
\draw[color=blue, dashed] (U-5-1.north west) -- (U-5-5.north east) -- (U-5-5.south east) -- (U-5-5.south west)-- (U-5-1.south west);
\node[below=5pt of U-5-1, red] (below-1) {$\mathbf{G}^{\left(1, 1\right)}$};
\node[below=12pt of U-5-2, red] (below-2) {\ldots};
\node[below=5pt of U-5-3, red] (below-3) {$\mathbf{G}^{\left(j, j\right)}$};
\node[below=12pt of U-5-4, red] (below-4) {\ldots};
\node[below=5pt of U-5-5, red] (below-5) {$\mathbf{G}^{\left(t, t\right)}$};
\draw[<->, thick, red, bend right=60] (U-5-1.south) to node[below, pos=0.5,sloped] {$\mathbf{G}^{\left(1, j\right)}$} (U-5-3.south);
\draw[<->, thick, red, bend right=60] (U-5-3.south) to node[below, pos=0.5,sloped] {$\mathbf{G}^{\left(j, t\right)}$} (U-5-5.south);
\node[right=7pt of U-1-5, blue] (right-1) {$\mathbf{H}_{11}$};
\node[right=17pt of U-2-5, blue] (right-2) {\vdots};
\node[right=7pt of U-3-5, blue] (right-3) {$\mathbf{H}_{kk}$};
\node[right=17pt of U-4-5, blue] (right-4) {\vdots};
\node[right=7pt of U-5-5, blue] (right-5) {$\mathbf{H}_{qq}$};
\draw[<->, thick, blue, bend left=60] (U-1-5) to node[above, pos=0.5] {$\mathbf{H}_{1k}$} (U-3-5);
\draw[<->, thick, blue, bend left=60] (U-3-5) to node[above, pos=0.5] {$\mathbf{H}_{jk}$} (U-5-5);
\end{tikzpicture}
\end{center}
\end{document}
I have some issues (described in following questions) with this output.
Issues/Questions
- Arrows joining columns are overlapping and also I want to extract them out too and the same for the arrows joining rows.
- Nodes for arrows joining the rows are not well aligned.
- How the shades for arrows can be extending further to differentiate from column shadings?
I'd highly appreciate your help and time to figure out these issues and look forward to any recommendation and suggestions to improve this partitioned matrix. Thanks
$\mathbf{G}^{\left(1, j\right)}$is for first and j-th column not for$\mathbf{G}^{\left(1, 1\right)}$and$\mathbf{G}^{\left(k, k\right)}$. I'd appreciate if you give feedback on these two things. Thanks – MYaseen208 Apr 28 '12 at 21:39\tikzstyle{more loosely dotted}=[dash pattern=on \pgflinewidth off 7.5pt]in your preamble and changing the related\drawcommand options. – percusse Apr 28 '12 at 21:58\draw[<->, thick, red, bend right=60] (U-4-1.-45) to node[below, pos=0.5,sloped] {$\mathbf{G}^{\left(1, j\right)}$} ($(U-4-1.-45)!0.5!(U-4-2.-135)$);as a starting point and modify further (withcalclibrary). – percusse Apr 28 '12 at 21:59