On the rank of a tropical matrix