  This paper treats linear algebra over a semiring pair, in a wide range of
applications to tropical algebra and related areas such as hyperrings and fuzzy
rings. First we present a more general category of pairs with their morphisms,
called ``weak morphisms,'' paying special attention to supertropical pairs,
hyperpairs, and the doubling functor. Then we turn to matrices and the question
of whether the row rank, column rank, and submatrix rank of a matrix are equal.
Often the submatrix rank is less than or equal to the row rank and the column
rank, but there is a counterexample to equality, discovered some time ago by
the second author, which we provide in a more general setting (``pairs of the
second kind'') that includes the hyperfield of signs. Additional positive
results include a version of Cramer's rule, and we find situations when
equality holds, encompassing results by Akian, Gaubert, Guterman, Izhakian,
Knebusch, and Rowen. We pay special attention to the question of whether $n+1$
vectors of length $n$ need be dependent. At the end, we introduce a category
with stronger morphisms, that preserve a surpassing relation.
