Finite and infinite structures of rational matrices: a local approach