Can you have a roll-up summary field in the case of a Master–Detail relationship?

In the case of a Master-Detail relationship, we can have a roll-up summary, but not in the case of a Lookup relationship. Because a roll-up summary field displays a value in the Master record depending on the values of a collection of fields in the Detail record, this is the case.