I'm typesetting a document in amsart document class. I want to show the different cases of a matrix with term rank 2 by drawing two lines in a matrix. How can I make a vertical line and a horizontal line to cross each other, something like:

Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Code: Select all
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}\small
\matrix (2rank) [matrix of math nodes, left delimiter = {[}, right delimiter = {]}]
{%
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
};
\draw[help lines] (2rank-1-1.north) -- (2rank-4-1.south);
\draw[help lines] (2rank-1-1.west) -- (2rank-1-4.east);
\end{tikzpicture}
\end{document}
Code: Select all
$A=$
\begin{tikzpicture}\small
\matrix (2rank) [matrix of math nodes, left delimiter = {[}, right delimiter = {]}]
{%
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
};
\draw[help lines] (2rank-1-1.north) -- (2rank-4-1.south);
\draw[help lines] (2rank-1-1.west) -- (2rank-1-4.east);
\end{tikzpicture}
Code: Select all
\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}\small
\matrix (2rank) [matrix of math nodes, left delimiter = {[}, right delimiter = {]}]
{%
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
\phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} & \phantom{\cdot} \\
};
\draw[help lines] (2rank-1-1.north) -- (2rank-4-1.south);
\draw[help lines] (2rank-1-1.west) -- (2rank-1-4.east);
\node at (-1.3,0) {$A=$};
\end{tikzpicture}
\end{document}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis