Let X be a path connected space and Y be a topological space. Let f:X→Y be a function such that for every path τ:I→X , fτ:I→Y is continuous.

Does it follow that f is continuous ?

Thank you

**Answer**

No, it does not follow. Let

X={0}×[0,1]∪[0,1]×{1}∪∞⋃n=1Ln,

where Ln={(x,nx):1n2⩽, with the subspace topology induced by \mathbb{R}^2. Let f \colon X \to \mathbb{R} be given by

\begin{align}

f(0,y) &= y\\

f(x,1) &= 1+x\\

f(x,nx) &= 1 + \frac{1}{n} + (1-nx).

\end{align}

Then f is not continuous in (0,0), since f\left(\frac{1}{n^2},\frac{1}{n}\right) = 2 for all n \geqslant 1, but f is continuous in all other points. Since every path passing through (0,0) in Y must lie on the segment \{0\}\times [0,1] in a neighbourhood of all t with \tau(t) = (0,0), f\circ \tau is continuous for all paths.

However, as Ted Shifrin notes in a comment, if X is locally path-connected and first countable, then the continuity of f\circ\tau for all paths \tau \colon \mathbb{I} \to X implies the continuity of f.

**Attribution***Source : Link , Question Author : Amr , Answer Author : Community*