1

I would like to created a matrix as the one in the picture. I read on another post that it is possible to do with tikz. My problem is that I want also to write on the left A= the matrix, with A= centered. is it possible to do using tikz? beause if I try just to write A=, I find A= aligned with the bottom of the matrix. enter image description here

1 Answers1

4

Here is a solution with pstricks-add. The idea is to set empty nodes at relevant places in the matrix and connect them with the \psbraces command.

You can compile either with xelatex, or with pdflatex, if you use the --enable-write18switch (MiKTeX) or -shell-escape (TeX Live, MacTeX).

\documentclass[border =10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{fourier}
\usepackage{mathtools}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf} 

\begin{document}

\( \begin{postscript}
\begin{bmatrix}
a & \pnode[0,1.6ex]{R1}b & c &{d}\pnode[0,1.6ex]{R2} & x & \pnode[0,1.6ex]{Z1}x & x\pnode[0,1.6ex]{Z2}\pnode[1.25ex,1.5ex]{T2} \\ 
\pnode[-1.5ex, 1ex]{A1} e & f & g & h & x & x & x \\
y & y & y & y & y & y & y \\
\pnode[-1.5ex, -0.8ex]{A2}y & y & y & y & y & y & y \pnode[1.25ex, -1ex]{T1}\\
\pnode[-1.5ex, 1ex]{B1}y & y & y & y & y & y & y \pnode[1.25ex, 1.5ex]{U2}\\
i & j & k & l & x & x & x \\
\pnode[-1.1ex, -0.4ex]{B2}m &\pnode[0,-0.5ex]{S1}n & o\pnode[0,-0.5ex]{S2} &\pnode[0,-0.5ex]{W1} p & x & x\pnode[0,-0.5ex]{W2} & x \pnode[1.25ex, -0.5ex]{U1}
\end{bmatrix}
\psset{braceWidth=0.8pt, braceWidthInner=2pt, braceWidthOuter=2pt, nodesep=8pt, linejoin=1}
\psset{nodesepB=-4pt, nodesepA=0pt,  rot=-90}
\psbrace*[ref=cb](R2)(R1){$ R $}\psbrace*[ref=cb](Z2)(Z1){Z}
\psset{nodesepB=4pt, rot=90}
\psbrace*[ref=ct](S1)(S2){S}\psbrace*[ref=ct](W1)(W2){W}
\psset{nodesepB=0pt, nodesepA=4pt, rot=0}
\psbrace*[ref =cl](T1)(T2){T}\psbrace*[ref =cl](U1)(U2){U}
\psset{nodesepA=-4pt, rot=180}
\psbrace*[ref=cr](A1)(A2){A}\psbrace*[ref=cr](B1)(B2){B}
\end{postscript} \)

\end{document} 

enter image description here

Bernard
  • 271,350