I want to recreate the image below, but I cannot set it correctly.enter image description here I tried to follow this example: Matrix decomposition

1 Answer 1



\usetikzlibrary{matrix, positioning}
  tighter delimiters/.style={
    every left delimiter/.style={xshift=+.5ex},
    every right delimiter/.style={xshift=+-.5ex},
    every above delimiter/.style={yshift=+-.5ex},
    every below delimiter/.style={yshift=+.5ex}},
  @/.style args={#1>#2}{#1/.style={every #2 delimiter/.append style={label={##1}}}},
  @/.list={ld>left, rd>right, ad>above, bd>below}
  absolute, node distance=+0cm,
  big/.style args={#1x#2}{
    node font=\Huge, fill=blue!50,
    minimum width={(#1)*1cm}, minimum height={(#2)*1cm}},
  big'/.style={big={#1}, fill=none}]
\path[ld={left:$n$ samples}, bd={below:$p$ input features}]
 node[big=2x3, left delimiter=\{, below delimiter=\}] (X) {$X$};
\node[big'=0x0, base right=of X] (eq) {${}={}$};
\path[rd={right:$n$ samples}, bd={below:$k$ latent dimensions}]
 node[big=1x3, base right=of eq, right delimiter=\}, below delimiter=\}] (A) {$A$};
\path[rd={right:$k$ latent dimensions}, ad={above:$p$ input features}]
 node[big=2x1, anchor=south west, at=(A.north east),
      above delimiter=\{, right delimiter=\}] (B) {$B$};


enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .