Let $V$ (resp. $W$) be the real vector space of all polynomials in two commuting (resp. noncommuting) variables with real coefficients and of degree strictly less than $100$. What are the dimensions of $V$ and $W$?
My approach :
- To calculate dimension of $V$
We just have to count number of basis elements in the basis of $V$. The basis elements of $V$ are of the form $x^iy^j$ where $i,j\in \Bbb N \cup \{0\}$ and $i+j \le 99.$
Case-1)For $i=0$, we have $0 \le j \le 99.$ i.e we have $100$ choices for $j$.
Case-2)For $i=1$, we have $0 \le j \le 98$. i.e. we have $99$ choices for $j$.
Case-99)For $i=98$, we have $0 \le j \le 1$. i.e. we have $2$ choices for $j$.
Case-100)For $i=99$, we have $j=0$ as the only $1$ choice.
By addition rule, we get $\text {number of elements in the basis of V} = 1+2+3+...+100=\frac {100(101)}2=5050=\dim V.$
- To calculate dimension of $W$
Again we count the number of basis elements in the basis of $W$. But here $x^iy^j \neq y^jx^i \; \forall \; i,j \ge 1.$ Thus we count number of basis elements for $x^i,y^j \; \forall i,j \ge 1$ only and then multiply the same by $2$.
We first count number of elements in the list $x^0, x^1, x^2,...x^{99}$ which is $100$ and number of elements in the list $y^1,y^2,...,y^{99}$ which is $99$.
For the $x^iy^j \;\;\; i,j \ge 1$ part we proceed as follows,
Case-1)For $i=1,$ we have $1 \le j \le 98.$ i.e. we have $98$ choices for $j$.
Case-2)For $i=2,$ we have $1 \le j \le 97.$ i.e. we have $97$ choices for $j$.
Case-97)For $i=97$, we have $1 \le j \le 2$ i.e. we have $2$ choices for $j$.
Case-98)For $i=98$, we have only $1$ choice for $j$ i.e. $j=1$.
Therefore by addition rule we have $1+2+3+...+98=\frac {98(99)}2=4851$ choices. As per our argument above, we have considered only $x^iy^j$ part. Thus $y^jx^i$ part also has $4851$ choices.
$\therefore \text {Total number of elements in basis of W}=199+2 \times 4851=9901=\dim W$
Is my approach correct?
EDIT : As it has been pointed out in comments by @NickPavlov, I have messed up in non-commuting case. I have left out elements such as $xyx^2$, $yxyxyxy^5$ etc. How should I count this kind of elements?
A monomial of total degree $k\geq0$ in two noncommuting variables $x$ and $y$ is a word of length $k$ over the alphabet $\{x,y\}$. Of course one then abbreviates such words by concatenating adjacent equal letters, e.g., $xxyxyyyxyy=:x^2yxy^3xy^2$. The number of such binary words is $2^k$. It follows that $${\rm dim}(W)=\sum_{k=0}^{99}2^k=2^{100}-1\ .$$