Advertisement
Guest User

Untitled

a guest
Sep 29th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.19 KB | None | 0 0
  1. \documentclass{minimal}
  2.  
  3. \usepackage{tikz}
  4. \usetikzlibrary{matrix,calc}
  5. \tikzset{
  6.    every path/.style={dashed},
  7.    every picture/.style={baseline},
  8.    mymatrix/.style={
  9.        matrix of math nodes,
  10.        left delimiter=(,
  11.        right delimiter=),
  12.        every cell/.style={anchor=base east},
  13.    },
  14. }
  15.  
  16. \begin{document}
  17. \begin{center}
  18.  
  19. \begin{tikzpicture}
  20.    \matrix (m) [mymatrix] {
  21.        0 & 1 & 2 & -1 \\
  22.        0 & 0 & 0 &  1 \\
  23.        0 & 0 & 0 &  0 \\
  24.    };
  25.    
  26.    \draw (m-1-1.north east) |- ($(m-2-3.north)!.5!(m-2-4.north)$) |- ($(m-2-4.east)!.5!(m-3-4.east)$);
  27. \end{tikzpicture},
  28. \begin{tikzpicture}
  29.    \matrix (m) [mymatrix] {
  30.        1 & 2 & 1 & -1 & 2 \\
  31.        0 & 0 & 1 &  0 & 2 \\
  32.        0 & 0 & 0 &  2 & 3 \\
  33.    };
  34.    
  35.    \draw (m-1-1.south west) -| ($(m-2-2.south)!.5!(m-2-3.south)$) -| ($(m-3-3.south)!.5!(m-3-4.south)$);
  36. \end{tikzpicture},
  37. \begin{tikzpicture}
  38.    \matrix (m) [mymatrix] {
  39.        1 & 0 & -1 \\
  40.        0 & 2 &  1 \\
  41.        0 & 0 &  3 \\
  42.    };
  43.    
  44.    \draw ($(m-1-1.west)!.5!(m-2-1.west)$) -| ($(m-2-1.south)!.5!(m-2-2.south)$) -| ($(m-3-2.south)!.5!(m-3-3.south)$);
  45. \end{tikzpicture}
  46.  
  47. \end{center}
  48. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement