I'm trying to draw a commutative diagram for kernel trick. I'm trying the following code:
\[
\begin{tikzcd}
&X \arrow{r}{\Phi} & H& \\%
X \times X \arrow[swap]{dr}{\pi_X} \arrow[swap]{ur}{\pi_X} \arrow{r}{k} &
\mathbb{R} &&
\mathcal{H} \times \mathcal{H} \arrow[swap]{ul}{\pi_\mathcal{H}}
\arrow[swap]{dl}{\pi_\mathcal{H}} \arrow{l}{\langle \cdot, \cdot \rangle_\mathcal{H}}\\%
&X \arrow{r}{\Phi} & H&
\end{tikzcd}
\]
This code produces that diagram:
With 2 errors:
No shape named `tikz@f@5-2-3' is known. I think the culprit is a tikzcd arrow in cell 2-4.
No shape named `tikz@f@5-2-3' is known. I think the culprit is a tikzcd arrow in cell 2-4.
Actually, the diagram is almost nice except that k
arrow is too short and \mathbb{R}
is not centered. I guess the errors are all about this, but I'm quite new to tikz, so don't fully understand this errors. Can someone shred some light on the errors and ways to improve the diagram? Thanks.