is there an analogue of short exact sequences for semigroups? Since semigroups don't need to have an identity element, I was wondering if there's any kind of short exact sequence for semigroups.  
 A: Suppose that you have a homomorphism of semigroups $f\colon S\to T$. The kernel of $f$ is defined to be the congruence $\mathrm{ker} f$ on $S$ defined by:
$$\mathrm{ker} f = \{ (s_1,s_1)\in S\times S\mid f(s_1)=f(s_2)\}.$$
Note that $S/\mathrm{ker} f \cong f(S)$.
We also define the image of $f$, $\mathcal{K}_{\mathrm{Im}f}$ to be the relation on $T$ defined by:
$$\mathcal{K}_{\mathrm{Im} f} = f(S)\times f(S)\cup\{(t,t)\mid t\in T\}.$$
Edit: The image need not be a congruence if $f(S)$ is not an ideal in $T$, because it need not be a subsemigroup of $T\times T$. But this agrees with the situation in, say, not-necessarily-abelian groups, where the image need not be a normal subgroup (and thus, not "eligible" to be equal to a kernel). 
Given homomorphism $f\colon S\to T$ and $g\colon T\to U$, we say that
$$S\stackrel{f}{\longrightarrow} T \stackrel{g}{\longrightarrow} U$$
is exact (at $T$) if and only if $\mathrm{ker} g = \mathcal{K}_{\mathrm{Im} f}$. 
So we say that $S\stackrel{f}{\longrightarrow} T\stackrel{g}{\longrightarrow} U$ is a short exact sequence if and only if
$\mathrm{ker} f = \{(s,s)\mid s\in S\}$, $\mathcal{K}_{\mathrm{Im} f} = \mathrm{ker}g$, and $\mathcal{K}_{\mathrm{Im} g} = U\times U$. 
You can also see it by extending to monoids first. Given any semigroup $S$, you can always adjoin an identity element by taking some $1\notin S$, and defining the operation on $S\cup\{1\}$ by extending the multiplication by the rule $1s=s1=s$ for all $s\in S$; this monoid is denoted $S^1$ (even if $S$ already has an identity, we adjoin a new element). If $f\colon S\to T$ is a semigroup homorphism, then this induces a monoid homomorphism $f^1\colon S^1\to T^1$ by $f^1(s)=f(s)$ for all $s\in S$, and $f(1) = 1$. If we do this, then note that
$$\mathrm{ker}(f^1) = \mathrm{ker}(f)\cup\{(1,1)\}$$
is a congruence on $S^1$; and that
\begin{align*}
\mathcal{K}_{\mathrm{Im}f^1} &= f^1(S^1)\times f^1(S^1)\cup\{(t,t)\mid t\in T^1\}\\
&= f(S)\times f(S) \cup\{(t,t)\mid t\in T\} \cup\{(1_T,1_T)\}\\
&= \mathrm{K}_{\mathrm{Im}f}\cup\{(1_T,1_T)\},
\end{align*}
so that if we have $S\stackrel{f}{\to}T\stackrel{g}{\to}U$, with corresponding $S^1\stackrel{f^1}{\to} T^1\stackrel{g^1}{\to} U^1$, then $\mathrm{ker}f = \mathcal{K}_{\mathrm{Im}g}$ if and only if $\mathrm{ker}f^1 = \mathcal{K}_{\mathrm{Im}g^1}$. 
If we do this, then 
$$S\stackrel{f}{\longrightarrow} T \stackrel{g}{\longrightarrow} U$$
is a short exact sequence if and only if
$$1 \longrightarrow S^1 \stackrel{f^1}{\longrightarrow} T^1\stackrel{g^1}{\longrightarrow} U^1 \longrightarrow 1$$
is exact at $S^1$, $T^1$, and $U^1$.
