[Tex/LaTex] Four Node Commutative Diagram in LaTeX


I am quite new to LaTeX and I was curious if anyone knew how to make these sorts of diagrams. I saw one other picture on here but it was a three node diagram and I wasn't sure how to make LaTeX recognize to make a square when I inserted another node. Any ideas?

Edit: Specifically, this works:

\begin{tikzpicture}[every node/.style={midway}]
\matrix[column sep={4em,between origins},
        row sep={2em}] at (0,0)
{ \node(R)   {$R$}  ; & \node(S) {$S$}; \\
  \node(R/I) {$R/I$};                   \\};
\draw[<-] (R/I) -- (R) node[anchor=east]  {$\chi$};
\draw[->] (R/I) -- (S) node[anchor=north]  {$\psi$};
\draw[->] (R)   -- (S) node[anchor=south] {$\phi$};

But I need to change the starting points and destinations of arrows to allow for four nodes.

Best Answer

It's really easy with tikz-cd:



R \arrow{r}{\phi} \arrow[swap]{d}{\chi} & S \arrow{d}{\Psi} \\
R/I \arrow{ur}{\psi} \arrow{r}{\Phi} & T


enter image description here