How to check whether it is a direct product? What is the simplest way to check whether a given function of two arguments (Its arguments and the value are morphisms of some category.) is a direct product in categorical sense?
 A: You seem to be asking whether it is possible to give an essentially algebraic axiomatisation of categorical products. The short answer is: yes, but you need some additional data.
Let $\mathcal{C}$ be a category. Suppose we have the following operations:


*

*For every pair of objects $(A, B)$, another object $A \times B$ and two arrows $\pi_{A,B} : A \times B \to A$, $\pi'_{A,B} : A \times B \to B$.

*For every triple of objects $(A, B, C)$ and pair of arrows $f : C \to A$, $g : C \to B$, an arrow $\langle f, g \rangle : C \to A \times B$, such that the following axioms hold:


*

*$\pi_{A,B} \circ \langle f, g \rangle = f$

*$\pi'_{A,B} \circ \langle f, g \rangle = g$

*For all $h : C \to A \times B$, $\langle \pi_{A,B} \circ h, \pi'_{A,B} \circ h \rangle = h$
Exercise. Verify that the triple $(A \times B, \pi_{A, B}, \pi'_{A, B})$ has the universal property of the product of $A$ and $B$.
Some other universal constructions in categories can also be made essentially algebraic: this is done in the first chapter of Lambek and Scott's Introduction to higher order categorical logic, for example.
