So, it seems that in a real-valued setting, the limit and the derivative of a real-valued function is defined only if the domain is an open subset of Euclidean space. I'm a little confused as to why this is the case, and why we can't just define a limit and derivative on any subset of Euclidean space with a limit point (well I know that limit can be defined on anything with a limit point, but I'm more unsure of the derivative). The way I was explained was that you need to be locally "similar" to a vector space so that we can add and subtract points to obtain the "linear approximation". Is this the right way to think about it? I know manifolds enter this discussion at some point. If anyone has a reference that would be helpful as well.