Comma category as weighted limit

Let $F : C \to E$ and $G : D \to E$ be functors. Consider the comma category $(F \downarrow G)$ with its projections $\pi_1 : (F \downarrow G) \to C$ and $\pi_2 : (F \downarrow G) \to D$. Using the elementary construction of a comma category, it is easy to prove the following equality: $$F \; \circ \; \pi_1 \;\; = \;\; G \; o \; \pi_2$$

However, a comma category can also be seen as a special case of weighted limit in the 2-category of 1-categories. How to prove the above equality by using the properties of a weighted limit? What else can we deduce about comma categories from the fact that they are weighted limits?

The equality you state is not true in general. An object $(c,f,d)$ of the comma category consists of an object $c$ of $C$, an object $d$ of $D$, and a morphism $f \colon Fc \longrightarrow Gd$ in $E$. The projection functors $\pi_1$ and $\pi_2$ send this object to $\pi_1(c,f,d) = c$ and $\pi_2(c,f,d) = d$, so we have $(F\circ\pi_1)(c,f,d) = Fc$ and $(G\circ\pi_2)(c,f,d) = Gd$, which are not equal in general. They will be equal if $E$ is discrete, in which case the comma category is the pullback.
What is true in general is that there is a natural transformation $\lambda \colon F\circ\pi_1 \longrightarrow G\circ\pi_2$. The component of $\lambda$ at the object $(c,f,d)$ of $F \downarrow G$ is the morphism $f \colon Fc \longrightarrow Gd$ in $E$. This natural transformation is part of the structure of the comma category as a weighted limit, as I will now spell out.
The limit of a $2$-functor $J \colon \mathcal{A} \longrightarrow \mathcal{B}$ weighted by a $2$-functor $W \colon \mathcal{A} \longrightarrow \mathbf{\text{Cat}}$ consists of an object $\{W,J\}$ of $\mathcal{B}$ together with a ''universal cylinder'', which is a $2$-natural transformation $W \longrightarrow \mathcal{B}(\{W,J\},J-)$ such that the induced composite functor $$\mathcal{B}(B,\{W,J\}) \longrightarrow [\mathcal{A},\mathbf{\text{Cat}}](\mathcal{B}(\{W,J\},J-),\mathcal{B}(B,J-)) \longrightarrow [\mathcal{A},\mathbf{\text{Cat}}](W,\mathcal{B}(B,J-))$$ is an isomorphism of categories.
(Note that if $\mathcal{A}$ is a category, then these $2$-functors and $2$-natural transformations just amount to functors and natural transformations respectively.)
Now let $\mathcal{A}$ denote the free category on the graph $\bullet \longrightarrow \bullet \longleftarrow \bullet$.The comma object $f/g$ of a cospan $f \colon A \longrightarrow C \longleftarrow B \colon g$ in a $2$-category $\mathcal{B}$ is the limit of the corresponding functor $J \colon \mathcal{A} \longrightarrow \mathcal{B}$ weighted by the functor $W \colon\mathcal{A} \longrightarrow \mathbf{\text{Cat}}$ that picks out the cospan $\bot \colon 1 \longrightarrow \mathbf{2} \longleftarrow 1 \colon \top$, where $\mathbf{2}$ denotes the free category on the graph $\bot \longrightarrow \top$. The universal cylinder for this weighted limit is a natural transformation as displayed in the commutative diagram $$\require{AMScd} \begin{CD} 1 @>\bot>> \mathbf{2} @<\top<< 1\\ @VpVV @VV\lambda V @VVqV\\ \mathcal{B}(f/g,A) @>>\mathcal{B}(1,f)> \mathcal{B}(f/g,C) @<<\mathcal{B}(1,g)< \mathcal{B}(f/g,B) \end{CD}$$ in $\mathbf{\text{Cat}}$, which amounts to a $2$-cell $\lambda \colon fp \longrightarrow gq$ in $\mathcal{B}$ as in the following diagram. $$\require{AMScd} \begin{CD} f/g @>q>> B \\ @VpVV \Longrightarrow @VVgV \\ A @>>f> C \end{CD}$$
• I understand that the natural transformation $\lambda \colon F\circ\pi_1 \longrightarrow G\circ\pi_2$ comes from the 2-naturality of the universal cylinder. What about the universal property (in its 1-dimensional and 2-dimensional aspects) of the weighted limit? What does it say about the comma category? – Bob Oct 25 '16 at 18:14
• Note that since our $\mathcal{A}$ is a category, we can just think of the universal cylinder as an ordinary natural transformation, there is no $2$-dimensional condition on it at all. You can read off the universal property of the universal cylinder from the third paragraph of my answer. It is that for each object $X$ of the $2$-category $\mathcal{B}$, the universal cylinder induces an isomorphism between the hom-category $\mathcal{B}(X,f/g)$ and the category of ''cylinders with vertex $X$'', which are squares like the final diagram, but with $X$ in place of $f/g$. – Alexander Campbell Oct 25 '16 at 22:25