Extending inner product from subspace to whole space

inner-productslinear algebravector-spaces

Suppose that V is a vector space over either R or C, W is a
subspace of V , and we are given an inner product on W. Show that there
is at least one way to extend this function to an inner product on all of
V . Do not assume that V is finite-dimensional.

My best guess is saying V=W+U f(u+w)=w where f linear but that gives then $\langle f(u+w),f(u+w) \rangle$=0 if v is an element u or or v=0 which contradicts one of the axioms of an inner product

Best Answer

Take a subspace $W'$ of $V$ such that $V=W\bigoplus W'$. Define an inner product $g$ on $W'$. If $f$ is the inner product on $W$, you can extend it to the whole space by$$\langle v+v',w+w'\rangle=f(v,w)+g(v',w').$$