1

How can I create this diagram in latex? enter image description here

I would like to do it with the tikz package, as I want to annotate the edges.

I tried with this template, but it does not allow me to add \mathbb elements inside it. http://www.texample.net/tikz/examples/commutative-diagram-tikz/

I am sorry that I am not able to better explain my problem, I have never worked with stackexchange and I am a latex beginner.. Thank you for your help.

Edit:

What I have so far

\begin{tikzpicture}
\matrix (m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]
  {
 $\mathbb{R}^2$ & $R^2$ \\
 A_t & A \\
 $R^2$ & $R^2$ \\};
\path[-stealth]
(m-1-1) edge node [left] {$\mathcal{B}_X$} (m-2-1)
        edge [double] node [below] {$\mathcal{B}_t$} (m-1-2)
(m-2-1.east|-m-2-2) edge node [below] {$\mathcal{B}_T$}
        node [above] {$\exists$} (m-2-2)
(m-1-2) edge node [right] {$\mathcal{B}_T$} (m-2-2)
        edge [dashed,-] (m-2-1);
\end{tikzpicture}

My packages

\documentclass[10pt]{article}
\usepackage{fullpage,amsfonts,mathpazo}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsmath}

\usepackage{tikz}
\usetikzlibrary{matrix}

\pagestyle{empty}

The Result enter image description here

Edit2:

The Issue is solved, I used mathmode (dollar signs) inside the diagram which I should not have, removing them solved the issue. Thank you everyone who helped!

  • 1
    Add \usepackage{amssymb} to your preamble. \mathbb is not provided by default in LaTeX, but must be loaded with an external package, in this case amssymb. The example you cite does not provide it, so you must invoke it explicitly. – Steven B. Segletes Jan 19 '18 at 14:55
  • 1
    (1) welcome, (2) please post some minimal example code, so we can see exactly what you have tried. – daleif Jan 19 '18 at 15:00
  • What do you mean exactly by annotate? You want to insert large amounts of text pointing to the edges, or directly on the edges? – Alenanno Jan 19 '18 at 15:06
  • There is no reason to use this method to draw the diagram, the tikz-cd package provides a nice interface to draw these. BTW: make your sniplet into one single thing, a lot easier for others to copy and test. – daleif Jan 19 '18 at 15:11
1

This produces exactly what you want.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}
  \matrix (m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=2em]
  {
     \mathbb{F}^m & \mathbb{F}^n\\
     V & W \\
     \mathbb{F}^m&\mathbb{F}^n\\
 };
  \path[-stealth]
    (m-1-1) edge (m-2-1)
            edge node [above] {$A_1$} (m-1-2)
    (m-1-2) edge (m-2-2)
    (m-2-1) edge node [above] {$L$} (m-2-2)
    (m-3-1) edge (m-2-1)
            edge node [above] {$A_2$} (m-3-2)
    (m-3-2) edge (m-2-2)
;
\end{tikzpicture}
\end{document}

enter image description here

  • Thank you really much, I found my error: I tried using math mode inside the diagram, which is apparently not needed, and disable the already activated math mode, resulting in my error. – charel-f Jan 19 '18 at 15:09
4

You can do that very simply with tikz-cd:

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

\begin{document}
%

\[ \begin{tikzcd}[arrows = {-Stealth}]
\mathbb{F}^m \rar["A_1"] \dar & \mathbb{F}^n \dar \\%
V \rar["L"] & W \\
\mathbb{F}^m \rar["A_2"] \uar & \mathbb{F}^n \uar
\end{tikzcd}
\]

\end{document}

enter image description here

  • I am already using the other answer to realize my idea, and if I am honest, I can't exactly see how this is supposed to be easier. Nevermind, thank you for your help! – charel-f Jan 19 '18 at 15:23
  • The code is much shorter, that's the main point. Anyway, it's based on TikZ. – Bernard Jan 19 '18 at 15:43
  • 1
    Ease and difficulty are personal opinions :):):) By the way, +1! – CarLaTeX Jan 19 '18 at 15:52

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.