1

Can someone help me draw a double diagram like this with tikz-cd, please?enter image description here

3

One option (the second diagram has the arrows detached from the boxes)

\documentclass{article}
\usepackage{tikz-cd}
\usepackage{amssymb}

\begin{document}

\begin{tikzcd}[row sep=large,cells={nodes={draw,minimum height=0.6cm}}]
\mathbb{R}^{p}\ar[d,"\mathbf{D}_{p}",swap] & \mathbb{R}^{n^{\ast}}\ar[r,"\mathbf{Y}^{T}"]\ar[l,"\mathbf{X}^{T}",swap] & \mathbb{R}^{q}\ar[d,"\mathbf{D}_{q}"] \\
\mathbb{R}^{p^{\ast}}\ar[r,"\mathbf{X}",swap] & \mathbb{R}^{n}\ar[u,"\mathbf{D}_{n}",swap] & \mathbb{R}^{q^{\ast}}\ar[l,"\mathbf{Y}"]
\end{tikzcd}\par\bigskip

\begin{tikzcd}[row sep=large,arrows={shorten >= 2pt,shorten <= 2pt},cells={nodes={draw,minimum height=0.6cm}}]
\mathbb{R}^{p}\ar[d,"\mathbf{D}_{p}",swap] & \mathbb{R}^{n^{\ast}}\ar[r,"\mathbf{Y}^{T}"]\ar[l,"\mathbf{X}^{T}",swap] & \mathbb{R}^{q}\ar[d,"\mathbf{D}_{q}"] \\
\mathbb{R}^{p^{\ast}}\ar[r,"\mathbf{X}",swap] & \mathbb{R}^{n}\ar[u,"\mathbf{D}_{n}",swap] & \mathbb{R}^{q^{\ast}}\ar[l,"\mathbf{Y}"]
\end{tikzcd}

\end{document}

enter image description here

Do you really need the boxes? If not, delete the cells={...} part of the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.