M HYPE SPLASH
// updates

Is there a formula to calculate the euclidean distance of two matrices?

By Emma Terry
$\begingroup$

Wiki gives this formula

${\displaystyle {\begin{aligned}d(\mathbf {p} ,\mathbf {q} )=d(\mathbf {q} ,\mathbf {p} )&={\sqrt {(q_{1}-p_{1})^{2}+(q_{2}-p_{2})^{2}+\cdots +(q_{n}-p_{n})^{2}}}\\[8pt]&={\sqrt {\sum _{i=1}^{n}(q_{i}-p_{i})^{2}}}.\end{aligned}}}$

to calculate the euclidean distance of two vectors.

Is there a similar formula to calculate the euclidean distance of two matrices?

$\endgroup$ 1

1 Answer

$\begingroup$

There are many different forms of distance measures between two matrices.

  • Frobenius Norm: $\|A-B\|_F = \sum _{i=1}^{N}\sum _{j=1}^{N}|(a-b)_{ij}|^{2}$

  • Matrix 2-norm: $\| A - B\|_2 = \sqrt{\lambda_{max}(A-B)^{H}(A-B)}$

  • Matrix $\infty$ norm: $\|A-B\|_{infty} =\max _{1\leq i\leq m}\sum _{j=1}^{n}|(a-b)_{ij}|$

Essentially because matrices can exist in so many different ways, there are many ways to measure the distance between two matrices.

Think of like multiplying matrices. There are so many different ways to multiply matrices together. There are even at least two ways to multiple Euclidean vectors together (dot product / cross product)

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy