I saw the following definition of the identity here at 1:55. If $\mathcal{C}$ is a small category, $\forall x\in \mathcal{C}$, the identity can be thought of as a map from the one element set $\{*\}$ which is the terminal object to the endomorphisms of $x$. I.e. a function $f:\{*\}\to Hom(x,x)$ will pick out the identity $1_x$. I'm trying to make sense of this, here is my attempt.
So, since $\{*\}$ is terminal a map from $\{*\}\to \{*\}$ exists and is the identity. Similarly, a map $g:a\in Hom(x,x)\to x$ exists. Hence $g\circ f:\{*\}\to a\to \{*\}$ composes to the identity which can only happen if $f$ maps $\{*\}\mapsto 1_x=a$. Otherwise, $f$ would map $\{*\}$ to the zero object which can't happen.