It's been too long since I learned linear algebra, so apologies for the basic questions. Here's a snippet from my textbook:

Why is it that in the calculation of $||\vec{v}||$ we don't square the $\vec{i}$ and $\vec{j}$ terms even though they're in the definition of $\vec{v}$ right above?
Also, what does it mean to "square" a unit vector (or a vector in general)? I'm reading conflicting things online. Does $(\vec{i})^2$ denote calculating the dot product $<\vec{i},\vec{i}>$ and getting $1$ as the answer? Or would $(\vec{i})^2$ mean that we take the projection of $\vec{i}$ onto itself?
In general we have that
$$|\vec v|^2=\vec v\cdot \vec v=(a\vec i+b\vec j)\cdot (a\vec i+b\vec j)=\\=a^2(\vec i\cdot \vec i) +2ab(\vec i\cdot \vec j) +b^2(\vec j\cdot \vec j)=a^2+ b^2$$
therefore we can use
$$|\vec v|^2=a^2+ b^2$$