Yes, we can have a roll-up summary in the case of a Master-Detail relationship but not in the case of a Lookup relationship. This is because a roll-up summary field is used to display a value in the Master record based on the values of a set of fields in the Detail record.