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?