solve hw5 dimension yay. Theoretical stuff is tough :/