  The multiplicative semigroup $M_n(F)$ of $n\times n$ matrices over a field
$F$ is well understood, in particular, it is a regular semigroup. This paper
considers semigroups of the form $M_n(S)$, where $S$ is a semiring, and the
subsemigroups $UT_n(S)$ and $U_n(S)$ of $M_n(S)$ consisting of upper triangular
and unitriangular matrices. Our main interest is in the case where $S$ is an
idempotent semifield, where we also consider the subsemigroups $UT_n(S^*)$ and
$U_n(S^*)$ consisting of those matrices of $UT_n(S)$ and $U_n(S)$ having all
elements on and above the leading diagonal non-zero. Our guiding examples of
such $S$ are the 2-element Boolean semiring $\mathbb{B}$ and the tropical
semiring $\mathbb{T}$. In the first case, $M_n(\mathbb{B})$ is isomorphic to
the semigroup of binary relations on an $n$-element set, and in the second,
$M_n(\mathbb{T})$ is the semigroup of $n\times n$ tropical matrices.
  Il'in has proved that for any semiring $R$ and $n>2$, the semigroup $M_n(R)$
is regular if and only if $R$ is a regular ring. We therefore base our
investigations for $M_n(S)$ and its subsemigroups on the analogous but weaker
concept of being Fountain (formerly, weakly abundant). These notions are
determined by the existence and behaviour of idempotent left and right
identities for elements, lying in particular equivalence classes. We show that
certain subsemigroups of $M_n(S)$, including several generalisations of
well-studied monoids of binary relations (Hall relations, reflexive relations,
unitriangular Boolean matrices), are Fountain. We give a detailed study of a
family of Fountain semigroups arising in this way that has particularly
interesting and unusual properties.
