# Continuous in every linear direction not implies continuous

## Contents

## Statement

### For a function of two variables at a point

It is possible to have a function of two variables and a point in the domain of such that is continuous along *every* linear direction at (i.e., the function is continuous at for every vector ) but is not a continuous function.

### For a function of two variables overall

It is possible to have a function of two variables such that is continuous along *every* linear direction at *every point* in but is not a continuous function everywhere in , i.e., there exists a point in at which is not continuous.

### For a function of multiple variables

We can replace functions of two variables by functions of more than two variables.

## Related facts

- Existence of directional derivatives in all directions not implies differentiable
- Existence of partial derivatives not implies differentiable
- Separately continuous not implies continuous

## Proof

### Example

Consider the function:

Alternatively, we can describe it as:

We first argue that is continuous at all points other than :

- At any point with , the function is the zero function
*around*the point, hence is continuous. - At any point with , the function is the zero function
*around*the point, hence is continuous. - At any point with , the function has the rational function description
*around*the point, hence is continuous. - At any point on the line other than the origin, there are two definitions of the function around the point: the definition 0 (from the side), and the definition (from the side). Both definitions evaluate to zero at the point, which is the same as the function value at the point.
- At any point on the curve other than the origin, there are two definitions of the function around the point: the definition 0 (from the side), and the definition (from the side). Both definitions evaluate to zero at the point, which is the same as the function value at the point.

We now argue that is continuous in every *linear* direction at . It suffices to consider *half-line* directions because continuity from a linear direction is continuity from both half-line directions.

- For the half-line directions that are below or along the line, the function is identically zero along the half-line, so the limit at the origin is zero, which equals the zero.
- For the half-line direction the positive -axis, the function is identically zero along the half-line, so the limit at the origin is zero, which equals the zero.
- For the other half-line directions that are above , we note that,
*sufficiently close to the origin*, this half-line is completely above the curve (explicitly, if the slope of the line is , then the half-line is above for ). Thus, sufficiently close to the origin, looks like the zero function on this half-line. Thus, the limit at the origin is zero, which equals the value.

We finally demonstrate that is not continuous at by finding a curve approaching the origin along which the limit at the origin is not zero. Consider the curve:

Consider the limit:

### Intuitive explanation of example

Intuitively, this example function is zero on a very large subset of the domain, and the set of points where it is nonzero is a narrow squished subset of the plane that, near the origin, is too small to be detected by straight lines.

### Generalization to functions of more than two variables

We can use the same example as for a function of two variables, with the above functional form in terms of two of the input variables, and with the function independent of the remaining variables.