Understanding the definitions of vector and scalar

Let's consider two frames $S$ and $S'$. Positions in $S'$ are related to $S$ by a rotation $$\vec r\,'=R\,\vec r.$$ Then for a function to be a scalar means that $$T'(\vec r\,')=T(\vec r)$$ or equivalently $$T'(\vec r)=T(R^{-1}\vec r).$$ These equations say that if I want to find some scalar in the $S'$ frame (like temperature) I can use the same field$^*$ as in the $S$ frame but I just have to plug in the transformed position. The field itself doesn't change.

For a vector field this is no longer the case. To get the vector in the $S'$ frame I not only have to transform the position vector, but also the vector itself. Take a look at this diagram: enter image description here From the perspective of $S'$ the vector rotated along with the position vector$^{**}$ so we have $$\vec A\,'(\vec r\,')=R\vec A(\vec r)$$

$^*$ A field is just a quantity that depends on position. If we consider objects that are not fields we just get $T'=T$ and $\vec A\,'=R\vec A$.

$^{**}$ Confusingly enough this depends on whether we are looking at transformations of vectors $\vec A$ or vector components $A_i$. Some textbooks transform the basis vectors $\vec e_i$ such that the components $A_i$ change in the opposite way but the total vector $\vec A=\sum_i A_i\vec e_i$ remains constant. Suddenly we could have a $R^{-1}$ instead of $R$. Always make sure this makes sense for yourself.


For a physicist, a scalar, a vector or a tensor are simply objects that transform under certain rules. I think the key here is to understand that not any three quantities make a vector. Following your question, if you measure the temperature at three different cities, you might be tempted to put them in a row like $\vec{T}=(T_1,T_2,T_3)$ and name it a vector. However, this so-called vector does not transform as a vector, because under a rotation the temperatures in the cites do not change.


This might be a better question for math.stackexchange

Consider your example of temperature. The temperature at a certain location in space is independent of your coordinate system. You may call a point's location (1, 0, 0) and I may call it (r, theta, phi) because we're using different coordinate systems. But in either case, the temperature at that point is T. You won't measure temperature there to be higher or lower than me just by the fact that we are using different coordinate systems.

A vector's components aren't invariant in this way. The vector is the same object, but the components of the vector will depend on which coordinate system we pick. So you may write down a vector at some point at (1, 0, 0) but if I'm using a different coordinate system, then I might need to use (r, theta, phi) to describe the same vector.