Collaborative Filtering vs Content-based filtering

There’s a contrast between collaborative filtering and content-based filtering in a slide, saying the former recommends items based on rating of users who gave similar ratings.

From the perspective of cost function expression, how should we understand this intuitively and mathematically?

I recommend you watch all of the video lectures on these two topics, then come back here if you still have questions.

They’re essentially the same thing. The difference is in whether you are given values for the features, or if you have to learn them.