We find a combinatorial formula which computes the first cotangent cohomology module of Stanley–Reisner rings associated to matroids. For arbitrary simplicial complexes we provide upper bounds for the dimensions of the multigraded components of T1. For specific degrees we prove that these bounds are reached if and only if the simplicial complex is a matroid, obtaining thus a new characterization for matroids. Furthermore, the graded first cotangent cohomology turns out to be a complete invariant for nondiscrete matroids.