In $\mathbb{R}^2$, $r=\sqrt{x^2+y^2}$. However, it is also true that $r=xi+yj$
How are both of these definitions true?
In $\mathbb{R}^2$, $r=\sqrt{x^2+y^2}$. However, it is also true that $r=xi+yj$
How are both of these definitions true?
On
It seems to me that here $i$ and $j$ represent respectively the following unit vectors : $\begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $\begin{bmatrix} 0 \\ 1 \end{bmatrix}$. And $x,y$ are simply real scalars. Therefore the position vector $r$ can be expressed as a linear combination of these two units vector (LHS of your expression).
Now, by using ($ \begin{bmatrix} 1 \\ 0 \end{bmatrix}$,$ \begin{bmatrix} 0 \\ 1 \end{bmatrix} $) as an orthogonal basis for $\mathbb{R}^2$ we can calculate the norm of $r$ as follow : $\vert r \vert = \sqrt{ (x \vert i \vert )^2 + (y \vert j \vert)^2} = \sqrt{ x^2 (\vert i \vert )^2 + y^2 (\vert j \vert)^2}= \sqrt{ x^2 \cdot 1 + y^2 \cdot 1} = \sqrt{ x^2 + y^2 }$. Which give us the RHS of your question.
These represent different things.
Written in more common and clear mathematical notation, you have
$$r = \sqrt{x^2 + y^2} \qquad \vec r = x \hat\imath + y \hat\jmath$$
respectively. The former quantity is sometimes denoted $|\vec r|$ or $\|\vec r\|$ as well, whereas $\vec r$ may sometimes be written $\mathbf{r}$ as well.
The difference in notations specifies and clarifies the difference: $r$ in the first case is a single number, the magnitude of the vector $(x,y)$ in $\mathbb{R}^2$ (or, in the polar convention, may be thought of the radius of a circle whose edge contains $(x,y)$ as a point).
The second equality is the vector itself, written in terms of the basis vectors $\hat\imath = (1,0)$ and $\hat\jmath = (0,1)$.