A geometric approach to the theory of nonnegative matrices