I have been thinking about this for some time and I think this is the question I wanted to ask here, since it's more straightforward than asking "When is a mathematical operation/symbol manipulation valid?"
Say we have a function$$f(x)$$ So I know that I can multiply it. Or even derivate it. Correct? $$f(x) * 2 || dx f(x)$$
But those operations do not apply to a set. How can I multiply by 2 a set consisting of $$A,B,C$$
Perhaps there are many more valid "operations" (I guess this is the correct term for what I am asking. Can someone tell me if I'm right?). Is there any list or resource online where I can find them for each mathematical object?
I think my best interpretation of what you're looking for is the notion of automorphism.
Typically when studying a structure in mathematics we also study the maps that preserve that structure. Maps that preserve structure are called morphisms (with various prefixes). An endomorphism Is a morphism from an object to itself (functions on X to functions on X). An automorphism is an invertible endomorphism.
While some areas (particularly in logic) will tackle these notions in general, it is much more common to study the morphisms of a particular type of structure.
In your example, $ f \mapsto 2f$ is an automorphism of vectorspaces (as long as $2\neq 0$).