# Find orthonormal base to an inner product

I have an inner product defined on $$R^3$$ by:

$$((x_1,x_2,x_3)^T,(y_1,y_2,y_3)^T)_B = ((x_1-x_2, x_2-x_3,x_3)^T,(y_1-y_2,y_2-y_3,y_3)^T)$$

Where $$(,)$$ is the standard inner product on $$R^3$$.

Find an orthonormal base for $$(,)_B$$

## What i tried:

I tried to look at the inner product as a bilinear form:

$$((x_1-x_2, x_2-x_3,x_3)^T,(y_1-y_2,y_2-y_3,y_3)^T) = (x_1-x_2)(y_1-y_2) + (x_2-x_3)(y_2-y_3) + x_3y_3$$

$$= x_1y_1-x_1y_2-x_2y_1+2x_2y_2 - x_2y_3 - x_3y_2+ 2x_3y_3$$

Therefore i can define the inner product as:

$$(,)_B = x^TMy$$

Where:

$$M = \begin{bmatrix} 1&-1&0 \\ -1&2&-1 \\ 0&-1&2 \end{bmatrix}$$

I note that $$M$$ is symmetric.

Now, i tried to take $$M$$ as a change of base matrix.

Therefore, changing from the standard basis i get:

$$\begin{bmatrix} 1&-1&0 \\ -1&2&-1 \\ 0&-1&2 \end{bmatrix}(e_1,e_2,e_3)^T = ((1,-1,0)^T,(-1,2,-1)^T,(0,-1,2)^T)$$

Now i tried to normalaize the base using gram schmidat, yet, it doesnt seem to work, if i put the new base after normalization at $$(,)_B$$ i get that the vectors are not orthogonal, namely the inner product between them is not $$0$$.

Where is my mistake?

I also thought maybe to look at the quadratic form and diagonalaize it, but would it help me?

• If $P$ is a matrix such that $P^T MP = I,$ then the columns of $P$ are the new basis. Jun 6, 2020 at 0:38
• Thanks but how do you find that $P$? @WillJagy
– Alon
Jun 6, 2020 at 2:28

The columns of $$M$$ are not orthogonal with respect to the inner product. You can't just normalize and use them. That's not the right approach...

Let's look at several approaches.

1. Indeed, $$(x,y)_B = x^t M y$$. Since $$M$$ is symmetric, there exists an orthogonal basis WRT to the dot product consisting of eigenvectors, say $$v_1,v_2,v_3$$. This basis will be also orthogonal WRT to the now inner product. But this is only one way, and probably among the least efficient, because solving for eigenvectors is hard. An orthogonal basis need not consist of eigenvectors.

2. Gram-Schmidt, applied with this inner product will yield exactly what you want. Start with any basis you wish, say $$\{u_1,u_2,u_3\}$$, and you'll end up with

$$x_1 = u_1, x_2 = u_2 - \frac{(u_2,x_1)_B }{(x_1,x_1)_B}x_1, x_3 = u_3- \frac{(u_3,x_1)_B }{(x_1,x_1)_B}x_1 - \frac{(u_3,x_2)_B}{(x_2,x_2)_B} x_2.$$

These, by construction, are orthogonal.

1. Since we're dealing with a three dimensional space, it's much simpler doing it directly. Start with $$x_1 = (1,0,0)$$. The inner product of this with $$(a,b,c)$$ is $$a-b$$, so letting $$x_2 = (1,1,0)$$ we get a vector orthogonal to $$x_1$$.

Next, we need to find $$(a,b,c)$$ orthogonal to both. Clearly, we must have $$a=b$$, so choose $$a=b=1$$. Now the inner product of $$(1,1,0)$$ with $$(1,1,c)$$ is equal to $$1-1 -1+2 -c= 1-c$$. Therefore we choose $$c=1$$, that is $$x_3=(1,1,1)$$ is orthogonal to both $$x_1,x_2$$.

Bottom line, the vectors $$x_1= (1,0,0),x_2= (1,1,0)$$ and $$x_3=(1,1,1)$$ form an orthogonal basis for this inner product.

• and $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 1 & 1 & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - 1 & 0 \\ - 1 & 2 & - 1 \\ 0 & - 1 & 2 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$ Jun 6, 2020 at 1:51
• Thanks. In 2. Gram schmidat, you say, start with any basis you wish, but the problem is not normalization of the basis, the problem is finding a basis, then doing gram schmidat is technical.
– Alon
Jun 6, 2020 at 2:27
• @Alon I put details at math.stackexchange.com/questions/1388421/… Jun 6, 2020 at 2:31