I agree with @stepthom and @Onur Ece. But consider the case, in which only two users have only one common category. if we thus calculate the cosine similarity in only this dimension, the result will always be 1 (since the angle is zero). Even if the ratings are highly different.