After finding the solution to the minimization of $f(x,y,z)=\left(x-\frac{1}{2}\right)^2+\left(y-\frac{1}{2}\right)^2+\left(z-\frac{1}{2}\right)^2$ constrained by $h(x,y,z)=x^2+y^2+z^2-1=0$ by using the Lagrange multiplier method:
$$\nabla f(x,y,z) = 2 \begin{pmatrix} x-\frac{1}{2}\ \\ y-\frac{1}{2} \\ z-\frac{1}{2}\end{pmatrix}=\begin{pmatrix} 2x-1\ \\ 2y-1 \\ 2z-1\end{pmatrix}, \nabla h(x,y,z)=\begin{pmatrix} 2x \\ 2y \\ 2z \end{pmatrix}$$
such that: $\begin{pmatrix} 2x-1\ \\ 2y-1 \\ 2z-1\end{pmatrix}=\lambda \begin{pmatrix} 2x \\ 2y \\ 2z \end{pmatrix}, x=y=z=\frac{1}{2(1-\lambda)}$
solving for $\lambda$ using constraint: $3\left(\frac{1}{2(1-\lambda)}\right)^2=1 \Rightarrow 2(1-\lambda)= \pm \sqrt{3} \Rightarrow \lambda=1 \pm \frac{\sqrt{3}}{2}$
which yields: $x=y=z=\pm \frac{1}{\sqrt{3}}$
making the final solution: $(x,y,x,\lambda)=\left(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},1 - \frac{\sqrt{3}}{2}\right)$
Using that solution, it was suggested to use Gramm-Schmidt orthogonalization to construct two independent vectors orthogonal to $\nabla h\left(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}}\right)$ which will be in the tangential space of the feasible set.
I understand that I could just take two solutions to $a\frac{1}{\sqrt{3}}+b\frac{1}{\sqrt{3}}+c\frac{1}{\sqrt{3}}=0$ where $\vec{v}=(a,b,c)$ are the orthogonal vectors, but I'm curious how to implement Gramm-Schmidt with just one vector because as soon as you get to the second iteration, it seems that you need another vector. Is the idea to construct another linearly independent vector first and then use Gramm-Schmidt?
I guess that the idea is that you can choose any two vectors, as long as they are independent to $\nabla h$, but this is easy to achieve by simple inspection, e.g. two vectors from the canonical basis $e_1=(1,0,0)$, $e_2=(0,1,0)$ will do the job. Then apply Gram-Schmidt to the basis $(\nabla h,e_1,e_2)$ and you obtain an orthogonal basis where the second and third vectors are a basis of the plane that is orthogonal to $\nabla h$.