This question is inspired by Schrödinger operators with some "nice" $n \times n$ positive definite symmetric a.e. matrix potential defined on $\mathbb{R}^d$ acting on $\mathbb{R}^n$ valued functions defined on $\mathbb{R}^d$  

Suppose we have some $n \times n$ positive definite symmetric a.e. matrix function $M$ defined on $\mathbb{R}^d$ (intuitively, some sort of "Agmon function" on $\mathbb{R}^d$ related to our matrix potential). If we are lucky and have $n = d$ then $M$ canonically induces a metric on $\mathbb{R}^d$.  Namely, just define \begin{equation} d(x, y) =  \inf_\gamma \int_0^1 \langle M(\gamma(t)) \gamma '(t), \gamma'(t) \rangle_{ \mathbb{R}^d} ^\frac12 \, dt \tag{1}\label{Metric}\end{equation} where the infimum is over all absolutely continuous curves $\gamma : [0, 1] \rightarrow \mathbb{R}^d$ where $\gamma(0) = x$ and $\gamma(1) = y$.  

If $n \neq d$ then there seems no natural way to do this while "preserving" the matrix structure of $M$.  That is, I don't want to look at something like $$d(x, y) =  \inf_\gamma \int_0^1 \|M(\gamma(t))\| |\gamma '(t)|_{\mathbb{R}^d}  \, dt. $$

Surely $M$ can induce a bundle metric on some rank $n$ vector bundle, but it seems impossible to do this canonically in a way that reduces to \eqref{Metric} when $n = d$.  

Are there any papers in the Schrödinger operator literature that touch on this?  I can't imagine an issue like this hasn't come up somewhere in the world of mathematics...