# Categories: if $A \times B$ exists then $B \times A$ exists

I think this is a silly question, but I'm having troubles with the abstraction in category theory. Let $$\mathcal{C}$$ be a category and $$A,B$$ two objects in $$\mathcal{C}$$. Prove that if $$A \times B$$ exists, then $$B \times A$$ exists.

Now, $$A \times B$$ exists means that $$A \times B$$ is an object of $$\mathcal{C}$$ and there are two arrows $$\pi_1 :A \times B \rightarrow A$$, $$\pi_2: A \times B \rightarrow B$$ such that for any object $$S$$ in $$\mathcal{C}$$ and for any arrows $$f_1: S \rightarrow A$$, $$f_2: S \rightarrow B$$ there exists a unique arrow $$u: S \rightarrow A \times B$$ such that $$f_1 = \pi_1 \circ u$$, $$f_2 = \pi_2 \circ u$$.

Let $$S'$$ be an object of $$\mathcal{C}$$ and $$f_1': S' \rightarrow A$$, $$f_2': S' \rightarrow B$$. In order to prove that $$B \times A$$ exists I have to prove that this is an object of $$\mathcal{C}$$ and there are two arrows $$p_1: B \times A \rightarrow B$$, $$p_2: B \times A \rightarrow A$$ such that there's a unique $$u': S' \rightarrow B \times A$$ with $$f_1'=p_2 \circ u'$$, $$f_2'=p_1 \circ u'$$. But for that $$(S',f_1',f_2')$$ I know that $$f_1'= \pi_1 \circ u$$. And now I'm stuck.

• The only object you know to exist (apart from $A$ and $B$) is $A\times B$ -- so what would you try to put in charge for the role of $B\times A$? Jul 6 at 14:21

It may help if you avoid the names $$A \times B$$ and $$B \times A$$ of the objects that 'exist'.
You know there is some object $$P$$ with two arrows $$\pi_1 \colon P \to A$$ and $$\pi_2 \colon P \to B$$ satisfying the universal property of the product of $$A$$ and $$B$$. You have to find some object $$Q$$ with two arrows $$p_1 \colon Q \to B$$ and $$p_2 \colon Q \to A$$ satisfying the universal property of the product of $$B$$ and $$A$$. So, you just take $$Q = P$$, $$p_1 = \pi_2$$ and $$p_2 = \pi_1$$ and everything works out just fine.
• $p_1$ should have domain $Q$, but otherwise the most direct and best explanation. $+1$ Jul 6 at 14:35
• But, is this answer the proof that $A \times B = B \times A$? I don't think that's true in general... Jul 6 at 18:07
• @Ejrionm No, that's not what this proves. What it does say if $(P,\pi_1,\pi_2)$ is the categorical product of $A$ and $B$, then $(P,\pi_2,\pi_1)$ is the categorical product of $B$ and $A$. Jul 6 at 18:46