maximum distance between point and line

Hoi, I'm trying to prove something seemingly trivial...:PP

But i can't prove the following for Banach-spaces...i thought of many ways trying to solve this:

consider a line, say $\displaystyle l(t) = t(y-x)+x$ with $\displaystyle t\in [0,1]$...and a point $\displaystyle a$

I want to show that the maximal distance to $\displaystyle a$, (not on the line) and a point on the line $\displaystyle l(t)$, is between $\displaystyle a$, and one of

the boundary points of the line $\displaystyle l(0)$ or $\displaystyle l(1)$. That is, consider $\displaystyle g(t) = \left\|l(t)-a\right\|$ and assume $\displaystyle g(0)\leq g(1)$.

How can I show this (clearly continuous) function attains a maximum on $\displaystyle g(1)$. I cant prove this seemingly easy question.

I just don't see how this goes wrong when I assume that $\displaystyle g$ attains a maximum for any $\displaystyle s\in (0,1)$.

$\displaystyle [0,1]$ is compact, therefore $\displaystyle g$ must attain a maximum and a minimum somewhere....

But why must $\displaystyle g(1)$ be this maximum??

Re: maximum distance between point and line

This can be solved considering a triangle and a segment joining a vertex with the opposite side. We have a - l(t) = (1 - t)(a - l(0)) + t(a - l(1)), so g(t) <= (1 - t)g(0) + tg(1) <= [since g(0) <= g(1)] (1 - t)g(1) + tg(1) = g(1).