# orthogonal basis

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
Hello!!! I am stuck at the following exercise:
"Construct an orthogonal basis of $$R^{3}$$ (in terms of Euclidean inner product) that contains the vector
$$\begin{pmatrix}2\\1 \\-1 \end{pmatrix}$$ "

What I've done so far is:
Let {(a,b,c), (k,l,m), (2,1,-1)} be the basis.
Then since the basis has to be orthogonal:
(a,b,c)*(k,l,m)=0 => a*k+b*l+c*m=0
(a,b,c)*(2,1,-1)=0 => 2a+b-c=0
(k,l,m)*(2,1,-1)=0 => 2k+l-m=0
But I have three equations and six unknown variables.

What did I do wrong??What should I do???

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Mar 5, 2012
9,416
Re: orthogonal basis!!!

Hello!!! I am stuck at the following exercise:
"Construct an orthogonal basis of $$R^{3}$$ (in terms of Euclidean inner product) that contains the vector
$$\begin{pmatrix}2\\1 \\-1 \end{pmatrix}$$ "

What I've done so far is:
Let {(a,b,c), (k,l,m), (2,1,-1)} be the basis.
Then since the basis has to be orthogonal:
(a,b,c)*(k,l,m)=0 => a*k+b*l+c*m=0
(a,b,c)*(2,1,-1)=0 => 2a+b-c=0
(k,l,m)*(2,1,-1)=0 => 2k+l-m=0
But I have three equations and six unknown variables.

What did I do wrong??What should I do???
Hey evinda!

Well, if you have more unknowns than you have equations, that just means that you can freely pick a couple of them.
Suppose you pick a=1 and b=0, what should c be?
Btw, I picked a=1, since you need at least one non-zero entry in a basisvector.
And I picked b=0, since I prefer to have as many zero entries as possible.

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
Re: orthogonal basis!!!

So is the way I did the exercise correct???

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Mar 5, 2012
9,416
Re: orthogonal basis!!!

So is the way I did the exercise correct???
Yes.
I wouldn't introduce so many variables myself, since you're going to set most of them to 1 or 0 anyway.

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
Re: orthogonal basis!!!

Could you explain me how you mean I should start the hypothesis of the basis??

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Mar 5, 2012
9,416
Re: orthogonal basis!!!

Could you explain me how you mean I should start the ypothesis of the basis??
You're starting with (2,1,-1) and you need a vector that is perpendicular.
So try (1, 0, something).
When you have it, you need another vector that is perpendicular to both.
Try (something, something, 1) and start making it perpendicular to the 2nd vector, since that one already has a 0 in it.

#### Deveno

##### Well-known member
MHB Math Scholar
Feb 15, 2012
1,967
I would do this completely naively, as I often don't think far enough ahead.

We have to start with (2,1,-1). So now we need to find a vector (a,b,c) perpendicular to it. This means that:

2a + b - c = 0.

We have a LOT of possible choices, at this point. In fact, we can choose ANY vector of the form:

(a,b,2a+b) since:

2a + b - (2a+b) = 0.

So we really need to just pick a and b at this point. 1's and 0's usually make good choices. Of course, picking a = b = 0 is a BAD choice since (0,0,0) is not linearly independent from (2,1,-1).

So let's just go with a = 1, b = 0. this gives us the 2nd vector (1,0,2). Now we have to find a 3rd vector perpendicular to: (2,1,-1) and (1,0,2). let's call this vector (x,y,z). Then:

2x + y - z = 0
x + 2z = 0

We can solve this (under-determined) system in the usual way, obtaining:

x = -2z
y = z - 2x = z - 2(-2z) = 5z

so any vector of the form (-2z,5z,z) will be perpendicular to both. Again, z = 0 is a spectacularly BAD choice, but z = 1 works well, giving us (-2,5,1) as our 3rd vector.

Now verify that {(2,1,-1),(1,0,2),(-2,5,1)} is indeed a basis and that all these vectors are pairwise orthogonal.

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
I thank both of you very much!!!!!!!!!!!!

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
If ,instead of R^3,I have R^4 and I know a vector then I have six equations and 12 unknown variables.At the beginning for how many variables can I assume their value??3 or more??

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Mar 5, 2012
9,416
If ,instead of R^3,I have R^4 and I know a vector then I have six equations and 12 unknown variables.At the beginning for how many variables can I assume their value??3 or more??
With 6 equations and 12 variables you will have 6 free choices and 6 forced choices.
Btw, you're free choices are not entirely free in the sense that you're not supposed to accept a null vector.

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
I have also an other question .In the case of R^4,how many vectors are in the basis??3 or 4??

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Mar 5, 2012
9,416
I have also an other question .In the case of R^4,how many vectors are in the basis??3 or 4??
The standard basis is {(1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1)}.
Yep. There are 4 basis vectors in $\mathbb R^4$.

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
Nice!!!Thank you very much!!!

#### caffeinemachine

##### Well-known member
MHB Math Scholar
Mar 10, 2012
835
Hello!!! I am stuck at the following exercise:
"Construct an orthogonal basis of $$R^{3}$$ (in terms of Euclidean inner product) that contains the vector
$$\begin{pmatrix}2\\1 \\-1 \end{pmatrix}$$ "

What I've done so far is:
Let {(a,b,c), (k,l,m), (2,1,-1)} be the basis.
Then since the basis has to be orthogonal:
(a,b,c)*(k,l,m)=0 => a*k+b*l+c*m=0
(a,b,c)*(2,1,-1)=0 => 2a+b-c=0
(k,l,m)*(2,1,-1)=0 => 2k+l-m=0
But I have three equations and six unknown variables.

What did I do wrong??What should I do???
Not to interrupt the flow of the helpers on this thread, I think this will help you tremendously with these questions.

Given a vector $v$, there's a standard procedure to find an orthonormal basis which contains $v/||v||$. This procedure is the Gram-Schmidt procedure. See this Gram?Schmidt process - Wikipedia, the free encyclopedia

Once you get your orthonormal basis, you can easily get the orthogonal basis you seek.

#### evinda

##### Well-known member
MHB Site Helper
Apr 13, 2013
3,836
Nice..Thank you!!!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8959096074104309, "perplexity": 2409.2554885830814}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-25/segments/1623487621273.31/warc/CC-MAIN-20210615114909-20210615144909-00078.warc.gz"}