The set of real $n \times n$ matrices forms a vector space over the reals. Given any set $S$ of $n \times n$ matrices, there is a basis $S' \subseteq S$ of size at most $n^2$ such that any $x \in S \setminus S'$ can be written as a linear combination of elements in $S'$.
I am looking for a property $\Pi$ of matrices, such that any set of $n \times n$ matrices with property $\Pi$ has a basis of size $O(n)$ instead of $n^2$. In other words: I'm looking for subspaces of the $n \times n$ matrices that have dimension $O(n)$.
Taking $\Pi$ to be the the property of being a diagonal matrix works. Similarly, taking $\Pi$ to be the property of 'the nonzeros are restricted to at most one column' works; or more generally, considering any subset of $O(n)$ positions and having $\Pi$ require that all other positions are zeros, works. However, I am looking for less restrictive properties that yield a basis of size $O(n)$ for 'more interesting reasons'.
Taking $\Pi$ to be the positive semi-definite matrices does not work; the space of PSD matrices has dimension $\binom{n+1}{2}$. Are there any nontrivial properties beyond diagonality that ensure dimension $O(n)$?