# Finding the basis and dimension of the simple vector space

Suppose I have a vector space $$S$$ which is represented as all vectors in $$\mathbb{R}^3$$ satisfying $$a_1 - 3a_2+2a_3=0.$$

1) I need to find a basis and dimension. My assumption is as follows:

Basis is $$\begin{bmatrix} 1 \\ -3 \\ 2 \end{bmatrix}$$ of vectors in the vector space $$\mathbb{R}^3$$ and dimension is 3.

I know it is a simple question, I just want to make sure that I am on the right track and my assumption is correct.

2) Also, I was wondering what is the right way of finding a basis and dimension of following vector space defined as a function: $$y(x) = a \cos x + b \sin x$$ with arbitrary constants $$a$$ and $$b$$.

For the first, you wish to find vectors $$(a_1, a_2, a_3)$$ such that $$a_1 - 3a_2 + 2a_3 = 0.$$ If this equation came up in a row reduction process, we would identify $$a_2$$ and $$a_3$$ as free variables, since the pivot is in the first column. Thus we may write $$a_1 = 3a_2 - 2a_3.$$ From this we see that there are two free variables, and thus the dimension of the corresponding space is $$2.$$

Now for the basis. Any vector in this space has the form $$(3a_2 - 2a_3, a_2, a_3)$$. Decomposing shows that this is a sum of two vectors $$(3a_2, a_2, 0)$$ and $$(-2a_3, 0, a_3)$$, where $$a_2$$ and $$a_3$$ are free to be any real number. Thus we see that $$(3, 1, 0)$$ and $$(-2, 0, 1)$$ form a basis for this space. Two basis vectors, dimension two.

Let's now consider the collection of functions of the form $$a\cos x + b\sin x.$$ The zero function is in this collection, and it is easy to show that it is closed under linear combinations. A basis for this function space is the set $$\{\sin x, \cos x\},$$ with dimension 2.

• Ok, thanks for explanation Sean, I get it now. But what about, if let's say I had it as 2a1 - 3a2 + 4a3 = 0. Do I need to do row reduction first and then decomposing the result into number of vectors? – ViniLL Oct 21 '18 at 18:10
• No, just multiply by one-half. – Sean Roberson Oct 22 '18 at 3:43
• Got you, is there any general way to determine which variables can be considered as free variables? – ViniLL Oct 22 '18 at 19:51
• Do row reduction. Columns without pivots represent free variables. – Sean Roberson Oct 22 '18 at 19:55
• Got you, thanks a lot. – ViniLL Oct 27 '18 at 17:39

1) The vector $$[1,-3,2]$$ doesn't form a basis. You can check that this vector isn't even part of the vector space: $$1\cdot 1 -3 \cdot (-3) + 2 \cdot 2 = 14 \neq 0$$

In order to find a basis, you have to solve the equation. Write $$x_2= s$$, $$x_3=t$$. The solutions then are $$\begin{bmatrix} a_1 \\ a_2 \\ a_3 \end{bmatrix} = \begin{bmatrix} 3s - 2t \\ s \\ t \end{bmatrix}= s\begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix} +t \begin{bmatrix} -2 \\0 \\ 1 \end{bmatrix}. \tag{*}$$ Now you should be able to find a basis and the dimension of $$S$$.

2) I guess that the vector space you are considering is the space of all function of the form $$y(x)=a \cos x + b\sin x$$, with $$a,b\in\mathbb{R}$$. Note that this expression is of a similar form as $$({}^*)$$, you can read the basis from this equation.

• HI @Ernie060, thanks for edits to my question , I accepted it and added some more edits, please check above. So now I have a question, how did you verify that this is not a vector space? Cause a1−3a2+2a3=0 is a subset of R3, which is a vector space and it satisfies all the axioms and properties of vector space. I get the part with equations, so from there we can conclude that basis is a two vectors, which are [3 1 0] and [-2 0 1] right? And dimension is still 3? Sorry, I am new to vector spaces and might not fully understand the concept of it – ViniLL Oct 20 '18 at 23:27
• Hi @ViniLL. Your edits look good. I didn't say that the set is not a vector space, it is indeed a vector space. What I said was that the vector $(1,-3,2)$ is not a basis for the vector space. That vector is not even in the vector space, because if you substitute it in the equation, you'll see it doesn't satisfy the equation. The dimension is not 3. The dimension is 2 because the basis consists of two linearly independent vectors. Said differently: every vector in $S$ is a (unique) linear combination of those two vectors. Hence the dimension is two. – Ernie060 Oct 21 '18 at 8:46
• Ok, thank you, I get the point about dimension now. Could you tell me how did you come up with this equation : 1⋅1−3⋅(−3)+2⋅2=14≠0. Is there any formula for that ? – ViniLL Oct 21 '18 at 18:13
• I just substituted the vector $(1,-3,2)$ (of which you thought it was the answer) in the equation $a_1 - 3 a_2 + 2 a_2=0$. – Ernie060 Oct 21 '18 at 20:43
• Understood, I think I see now, thanks for the explanation. – ViniLL Oct 22 '18 at 19:54