TITLE: Can you have a vertical tangent where a function is undefined?
QUESTION [3 upvotes]: Can you have a vertical tangent where a function is undefined? For example, the function $y = 1/x$ is undefined at $x=0$, but that's where the denominator of its derivative is equal to $0$.

REPLY [1 votes]: You cannot have a tangent to a curve at any point that's not on the curve, nor a tangent to a graph of a function at a point not in its domain.
The reciprocal function $x\mapsto1/x$ has the set $\mathbb R\smallsetminus \{0\}$ as both its domain and its image.
However, one can do something like this: consider the set $\mathbb R\cup\{\infty\}$ where $\infty$ is neither $+\infty$ nor $-\infty$ but a single $\infty$ that is approached by going in either the positive or the negative direction. Then $x\mapsto1/x$ is a continuous function whose domain and whose image are both $\mathbb R\cup\{\infty\}.$ One can then consider how to define "tangent line" in a way that is consistent with the definitions used when working only with real numbers, and if this is successful, one should find that the $y$-axis is a tangent line to the graph of this function at $x=0$ and the $x$-axis is its tangent line at $x=\infty.$
{"set_name": "stack_exchange", "score": 3, "question_id": 2356839}