Yes, you can have a relation that is not a function. In mathematics, a relation is simply a set of ordered pairs. A function is a specific type of relation where each input is related to exactly one output.
For example, consider the relation that pairs people with their favorite colors. If we have pairs like (Alice, Blue), (Bob, Red), and (Alice, Green), this relation is not a function because the input ‘Alice’ is associated with two different outputs: ‘Blue’ and ‘Green’. In a function, each input must only map to one unique output.
In conclusion, while all functions are relations, not all relations are functions. A relation can have multiple outputs for a single input, whereas a function cannot.