Initial Understanding of the Concept of Metrics
A few days ago, I read the new book "Classical Mechanics" by Prof. Xian Gao from Sun Yat-sen University, and I have a preliminary understanding of the concept of "metric".
The key lies in the fact that Prof. Gao combines some of our existing concepts with some advanced mathematical tools, and introduces new concepts in a more concise and easy-to-understand language.
Generalization of the Pythagorean Theorem
We know that in flat Euclidian space, the distance between two points can be expressed by the Pythagorean theorem: \[ \begin{equation} \label{eq1} \mathrm{d}s^2=\mathrm{d}x^2+\mathrm{d}y^2, \end{equation} \] or in polar coordinates: \[ \begin{equation} \label{eq2} \mathrm{d}s^2=\mathrm{d}\rho^2+\rho^2\mathrm{d}\varphi^2. \end{equation} \]
So in other spaces, the Pythagorean theorem still holds as long as one takes infinitely small distances so that the space is approximately flat and linear. For example, on a sphere: \[ \begin{equation} \label{eq3} \mathrm{d}s^2=R^2\mathrm{d}\theta^2+R^2\sin^2\theta\,\mathrm{d}\varphi^2. \end{equation} \]
Write the Pythagorean theorem in quadratic form
Although the Pythagorean theorem holds in different spaces and coordinate systems, their forms seem to be less uniform (e.g. \(\eqref{eq1}\), \(\eqref{eq2}\) and \(\eqref{eq3}\)). But each of them is a square term. This prompted us to think of the quadratic forms we learned in linear algebra. So we try to write the above three Pythagorean theorems in the form of quadratic matrices: \(\eqref{eq3}\) and \(\eqref{eq3}\). \[ \begin{align} \mathrm{d}s^2&=\begin{pmatrix}\mathrm{d}x&\mathrm{d}y\end{pmatrix}\begin{pmatrix}1&0\\0&1\end{pmatrix}\begin{pmatrix}\mathrm{d}x\\\mathrm{d}y\end{pmatrix},\\[12pt] \mathrm{d}s^2&=\begin{pmatrix}\mathrm{d}\rho&\mathrm{d}\varphi\end{pmatrix}\begin{pmatrix}1&0\\0&\rho^2\end{pmatrix}\begin{pmatrix}\mathrm{d}\rho\\\mathrm{d}\varphi\end{pmatrix},\\[12pt] \mathrm{d}s^2&=\begin{pmatrix}\mathrm{d}\theta&\mathrm{d}\varphi\end{pmatrix}\begin{pmatrix}R^2&0\\0&R^2\sin^2\theta\end{pmatrix}\begin{pmatrix}\mathrm{d}\theta\\\mathrm{d}\varphi\end{pmatrix}. \end{align} \] It turns out that \[ \begin{equation} \mathrm{d}s^2\equiv\mathrm{d}\boldsymbol{\rho}^\mathrm{T}\,G\,\mathrm{d}\boldsymbol{\rho}. \end{equation} \] Uniform in form, now that's a good thing. We can write a generalized form \[ \begin{equation} \mathrm{d}s^2=\begin{pmatrix}\mathrm{d}\rho^1&\cdots&\mathrm{d}\rho^s\end{pmatrix}\begin{pmatrix}g_{11}&\cdots&g_{1s}\\\vdots&\ddots&\vdots\\g_{s1}&\cdots&g_{ss}\end{pmatrix}\begin{pmatrix}\mathrm{d}\rho^1\\\vdots\\\mathrm{d}q^s\end{pmatrix}. \end{equation} \] So we define the matrix \(g_{ab}\) as a metric. So the above three examples and other spatial/targeting metrics are clear :P.
So to summarize, the metric is a generalization of the Pythagorean theorem to infinitesimal distances.