# Terminal object implies projection is an isomorphism

Let $A$ be a terminal object in a category $\mathcal{C}$. Prove that for any object $X$ the projection $p: X \prod A \rightarrow X$ is an isomorphism.

Well using the universal property of the product we can find a map g: $X \rightarrow X \prod A$ such that $pg$ is the identity on $X$. However I don't see why $gp$ is the identity as well. Can you please help?

-
An alternate method is to use the Yoneda lemma. – Qiaochu Yuan Jan 4 at 10:44

We have $gp : X \times A \to X \times A$ and $pgp = p : X \times A \to X$.
Let $q: X\prod A \to A$ be the other projection. Then $pgp=p$ and $qgp=q$, where the second equality holds because $A$ is terminal. No use the uniqueness part of the universal property.