I’m trying to prove that $\Bbb{Z}$ and $K[x]$ are hereditary, so I think I should prove this for every principal ideal domain. Does anyone have any ideas?
At first we need to show that the global dimension of the PID is smaller or equal to 1 so that the derived functor Ext is equal to zero for every n>1 but then I don’t know how to work this.
There are a few ways to do this. The important fact is : $(*)$ a submodule of a free module $R^n$ over a PID $R$ is free. Now there are a few equivalent ways to proceed. $(*)$ implies that every projective module $P$ over $R$ is free, since it is a summand of a free module. So, it follows that any submodule of $P$ is free, and hence $R$ is hereditary.
You can tie this into the definition using $\mathrm{Ext}^i(M,N)=0$ for $i\ge 2$ easily as follows. $\mathrm{Ext}^i(M,N)$ can be computed using a projective resolution in the first variable. This is constructed as: $$ F\xrightarrow{f} M\to 0 $$ where $F$ is free. Now, $K=\ker(f)$ is a submodule of $F$ and hence free by $(*)$. So, we get a $2$ term projective (actually free) resolution $$ 0\to K\to F\to M\to 0. $$ Then, we compute $\mathrm{Ext}^i(M,N)$ by the cohomology of the complex resulting from applying $\mathrm{Hom}(-,N)$ to the above resolution. Then it is automatic (because the resolution is length $2$, i.e. in degrees $0$ and $1$) that $\mathrm{Ext}^{\ge 2}(M,N)=0$ for all $R$-modules $M$ and $N$.