Understanding the definitions of vector and scalar So I am preparing now to start studying Lagrangian and Hamiltonian mechanics with Marion's book on classical dynamics. It is the first time I encounter the formal definition of vector and scalar, and I found it hard to understand.
First of all, the definition of vector: correct me if I am wrong, but what I have understood is that, if a set of quantities, $A_1, A_2, A_3$ for three-dimensions, transforms as a point under a rotation transformation, then we call $\vec{A}=(A_1, A_2, A_3)$ a vector. In summary, a vector's components transform as a point under a coordinate rotation.
The definition I don't quite understand is the definition of a scalar. It is said that a scalar is a quantity that remains invariant under a coordinate rotation. How can one understand this definition for, for example, temperature? How can a scalar be expressed in terms of the coordinate we are in?
I would appreciate help in understanding these concepts, thanks in advance!
 A: 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:

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.
A: 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.
A: 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 as (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.
A: Scalars
To a mathematician, a scalar is just an element of a (scalar) field such as the field of the real numbers $\mathbb{R}$ or the field of the complex numbers $\mathbb{C}$.
To a physicist, a scalar is a real number characterizing a certain physical property at a given point (and time) in physical space, such as the temperature at that point. The temperature at a given point $P$ in physical space must be the same number whatever coordinate system you choose! You could say the "temperature function" I'm describing here is a "physical" function, that is, it assigns a real number to a given point $P$ in actual, "physical" space.
Mathematically, however, such a "physical" function will in general be represented by different "mathematical" functions $T$ and $\overline{T}$ in different coordinate systems $Oxyz$ and $\overline{O}\,\overline{x}\,\overline{y}\,\overline{z}$, such that $T(x,y,z)=\overline{T}(\overline{x},\overline{y},\overline{z})$. These functions assign a real number to a given triple of real numbers representing the point $P$ in the respective coordinate systems, i.e. they are functions in the mathematical sense.
An example is the following. Suppose we have two coordinate systems $Oxy$ and $O\,\overline{x}\,\overline{y}$ in "two dimensional physical space", related as follows: $$\begin{pmatrix}\overline{x}\\\overline{y}\end{pmatrix}=\begin{pmatrix}
\cos\theta&\sin\theta\\
-\sin\theta&\cos\theta
\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix},\quad\text{or equivalenty}\quad \begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}
\cos\theta&-\sin\theta\\
\sin\theta&\cos\theta
\end{pmatrix}\begin{pmatrix}\overline{x}\\\overline{y}\end{pmatrix}$$ for some given angle $\theta$. This means that the $\overline{x}$ and $\overline{y}$ axes are rotated over an angle of $\theta$ compared to the $x$ and $y$ axes (following the right hand rule). Suppose the temperature at a point $P$, represented in the $Oxy$ system by the coordinates $(x,y)$, is given by $T(x,y)=x+y$. Then obviously $T(x,y)\neq T(\overline{x},\overline{y})$; we need a new function $\overline{T}$ in $O\,\overline{x}\,\overline{y}$ such that $T(x,y)=\overline{T}(\overline{x},\overline{y})$, or $$T(x,y)=x+y=\overline{T}(\overline{x},\overline{y}).$$ Hence \begin{align}
\overline{T}(\overline{x},\overline{y})=x+y=\left(\cos\theta\,\overline{x}-\sin\theta\,\overline{y}\right)+\left(\sin\theta\,\overline{x}+\cos\theta\,\overline{y}\right)
\end{align} or $$\overline{T}(\overline{x},\overline{y})=\left(\cos\theta+\sin\theta\right)\overline{x}+\left(\cos\theta-\sin\theta\right)\overline{y}.$$
Vectors
To a mathematician, a vector is an element of a vector space.
To a physicist, a vector is imagined to be an arrow in physical space. When viewed in two different coordinate systems (both centered at the bottom of the arrow for simplicity), the coordinates of the endpoint of the vector will in general be different. Hence one can't just describe a physical vector by the coordinates $(x_1,x_2,x_3)$ of its endpoint in just one coordinate system $Ox_1x_2x_3$: one needs to know how to obtain the corresponding coordinates $\left(\overline{x}_1,\overline{x}_2,\overline{x}_3\right)$ in a different coordinate system $O\,\overline{x}_1\overline{x}_2\overline{x}_3$. Given that the origins coincide, the rule is pretty simple: the coordinate systems will be related to each other by a rotation, described by an orthogonal matrix: $$\begin{pmatrix}\overline{x}_1\\\overline{x}_2\\\overline{x}_3\end{pmatrix}=\begin{pmatrix}O_{11}&O_{12}&O_{13}\\
O_{21}&O_{22}&O_{23}\\
O_{31}&O_{32}&O_{33}\end{pmatrix}\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix}.$$ In index notation: $$\overline{x}_i=\sum_{j=1}^nO_{ij}x_j,\quad i=1,2,3.$$ Hence a physical vector can be described as being an ordered set of numbers $(x_1,x_2,x_3)$ which transform according to the rule just stated under a rotation of the coordinate axes (an orthogonal transformation).
A: What is a Scalar?
Scalar is a type of ‘number’. Most of the physical, abstract entities(or quantities or items or attribute etc..) can be represented by a single number(or type of number) are called as Scalars. Like Weight of a person(60 kg), height of a person(180 cm), cost of a chocolate(50 cents), number of students(60), age of a person(34 years) etc.
Most of the day to day entities that we deal with are represented as Scalars. We don’t call them explicitly as Scalars in day to day language, because there is no need to call them as Scalars until we need to work with something other than and different from a Scalar, called as Vectors.
Scalar is derived from ‘scale’ which means it can stretch or shrink. i.e. the number can increase or decrease. Mathematically it is a number in a number line axis whose range is between -infinity to + infinity with zero in the middle.
What is a Vector?
Vector is a (another) type of ‘number’. There are certain physical, abstract entities(quantities or items or attributes etc.) which are a combination of more than one entity. Hence can not represented by a single number or Scalars but requires ‘more than one number’ or ‘list of numbers’ called as Vectors for representation. Vector representation is required as a necessity and convenience.
Lets expand one example from Scalars to see why Vectors are needed and does the job.
While the ‘weight’(is a Scalar) of a person is important for the person himself, the combination of ‘weight and height’(is a Vector) is important if you are his Doctor. Remember the combination of weight and height is the Vector. If only weight or only height, then these would still be scalars.
When you know both Weight and Height then you can calculate the Body Mass Index to determine if the person is healthy with in the range or obese. As a doctor your patient’s Weights and heights are Vectors. So your observation of your patients for the day might be Person-1(80kg, 150cm), Person-2(95Kg, 180cm)... Person-N(64Kg, 165cm) as unique Patient vectors.
Now there is nothing to stop at Weight and Height. We can add age, sex in to the mix and it is endless. Person-1(80kg, 150cm, 44 years, Male), Person-2(95Kg, 180cm, 28 years, Male)... Person-N(64Kg, 165cm, 30 years, Female) etc.
Let’s move one-level above, if you as doctor is practising in large hospital which has 10s of other doctors attending to 1000s of patients everyday, the patient vector might be Person-N(64Kg, 165cm, 30 years, Female, Doctor1).
Lets move step above to the level of Country’s Health Care system which has the records of 100s of hospitals, 1000s of doctors and Millions of patients, the patient vector might be Person-N(64Kg, 165cm, 30 years, Female, Doctor1, Hospital2,CityX) etc.. Soon you would realize the usual number line arithmetic and Scalar representation is too complex and not convenient.
If you are from computer science/software back ground, Vectors might remind you the organization of data as tables in MS Excel or database. Each row in a table is a Vector while the columns of the table are the dimensions of the vector.
With Vectors, we can create clusters(clustering procedures already developed by mathematicians) among patient groups i.e. Group1(60–70 kg, 150–160cm, 30–35 years, Male only), Group2(50–60 kg, 160–170cm, 25–30 years, Male only) etc.. We can compare between individual patients, compare between cluster groups, predict who or which group is in danger etc.
Thanks to Mathematicians, Vector representation is advantageous as it is convenient and provides lot of theorems, tools, methods, shortcuts, procedures to work with Vectors.
What other examples can be cited for Vectors?
Virtually any entity which is combination of more than one entity are all valid examples of Vectors.
Directions(Walk100 m straight, turn right and walk 50 m to your destination).
Velocity(Distance in a direction Vs. time ) and Acceleration(Velocity in a direction Vs. time)
Force acting on a body(in each direction), Buying Patterns(essential or luxury items), Budget allocations etc.
Can we live with out Vectors?
Of course, we can.
From the above example, we can continue to treat each of the patient entity(weight, height, age, sex) as separate entities and use Scalars and the number line arithmetic(addition, subtraction, multiplication, division) but it would be tedious and time consuming and good luck!!!
Hope this is clear!!!
