Generally, I know that the trace of the hat matrix ($H$) is equal to the rank of H since it is an orthogonal projection. If I wanted to show the trace of $H$ in ridge regression, would I be able to somehow prove that it equals the degrees of freedom?