Math & Science ⇒ Typesetting a complex Matrix
Typesetting a complex Matrix
I'm am looking to typeset a particular matrix, but I haven't got any good ideas on how to start with this. The matrix is the following: Any help would be greatly appreciated, thanks in advance!
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Typesetting a complex Matrix
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc,fit,matrix}
\begin{document}
\begin{equation}
\begin{tikzpicture}[baseline={($(current bounding box.center)-(0,0.75ex)$)}]
\matrix (example) [%
matrix of math nodes,
nodes in empty cells,
left delimiter=(,
right delimiter=),
nodes={anchor=center,minimum size=2em}
] {%
& |[draw]|I_{2^0} & & & & & & \\
& & & & & & & \\
& & & |[draw]|I_{2^0} & & & & \\
& & & & & & & \\
& & & & & |[draw]|I_{2^0} & & \\
& & & & & & & \\
& & & & & & & |[draw]|I_{2^0} \\
& & & & & & & \\
};
\node[draw,inner sep=0pt,fit=(example-1-3) (example-2-4)] {$I_{2^1}$};
\node[draw,inner sep=0pt,fit=(example-1-5) (example-4-8)] {$I_{2^2}$}; % produces warning about "Underfull hbox"
\node[draw,inner sep=0pt,fit=(example-5-7) (example-6-8)] {$I_{2^1}$};
\end{tikzpicture}
\end{equation}
\end{document}
Best regards and welcome to the board
Thorsten
- Attachments
-
- The output as produced by the given example.
- tikZ-special-matrix.png (7.41 KiB) Viewed 2912 times
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10