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$};
\end{tikzpicture}
But I need to change the starting points and destinations of arrows to allow for four nodes.


\documentclass{...}and ending with\end{document}. – Herr K. Jul 06 '13 at 16:00tikz-cd– Herr K. Jul 06 '13 at 16:01matrix. If still does not work post a new question and include the errors you get. – JLDiaz Jul 06 '13 at 16:10\matrixhas the structure of a latex table, so you use&to make "cells" in each column, and\\to start a new row. So you can guess that you need to add the fourth node by adding& \node{...}in the code your posted, in the white space below node S. – JLDiaz Jul 06 '13 at 16:21