I'm trying to prove something is a matroid and to do that I must understand what a matroid is. I don't get the hereditary property.
A matroid is an ordered pair $(S, I)$. I is a non-empty family of subsets of $S$ such that if $B \in I$ and $A \subset B$ then $A \in I$
I try understanding this with an example. Let $S=\{2,3,5,9,7\}$ then let $I=\{2,3\}$. For any $A \subset B$ then of course it's going to be in $I$ e.g. $2$ and $3$ are in $B$ and $I$.
I'm assuming I don't understand the definition. Could someone provide a simple example that meats the hereditary property and does not? I don't fully understand the difference between subset ($\subset$) and in ($\in$).
$I$ has to be a set of subsets of $S$, e.g. something like
$$I = \{\{2\}, \emptyset\}.$$
Usually, the sets contained in $I$ are called independent. The hereditary property means that the subset of every independent set again is independent.
You can think of $I$ this way: You have some set $S$ and want to define (however you like) what it means for a subset of $S$ to be independent. You can do this either by giving some formula/condition every subset has to satisfy or you just explicitly list all independent subsets.
Now, some smart minds came to the conclusion that calling a property of sets independence only makes sense if the collection of these sets is a matroid, i.e. if