Frobenius inner product

From HandWiki
Short description: Binary operation, takes two matrices and returns a scalar

In mathematics, the Frobenius inner product is a binary operation that takes two matrices and returns a scalar. It is often denoted [math]\displaystyle{ \langle \mathbf{A},\mathbf{B} \rangle_\mathrm{F} }[/math]. The operation is a component-wise inner product of two matrices as though they are vectors, and satisfies the axioms for an inner product. The two matrices must have the same dimension - same number of rows and columns, but are not restricted to be square matrices.

Definition

Given two complex number-valued n×m matrices A and B, written explicitly as

[math]\displaystyle{ \mathbf {A} ={\begin{pmatrix}A_{11}&A_{12}&\cdots &A_{1m}\\A_{21}&A_{22}&\cdots &A_{2m}\\\vdots &\vdots &\ddots &\vdots \\A_{n1}&A_{n2}&\cdots &A_{nm}\\\end{pmatrix}} \,, \quad \mathbf {B} ={\begin{pmatrix}B_{11}&B_{12}&\cdots &B_{1m}\\B_{21}&B_{22}&\cdots &B_{2m}\\\vdots &\vdots &\ddots &\vdots \\B_{n1}&B_{n2}&\cdots &B_{nm}\\\end{pmatrix}} }[/math]

the Frobenius inner product is defined as,

[math]\displaystyle{ \langle \mathbf{A}, \mathbf{B} \rangle_\mathrm{F} =\sum_{i,j}\overline{A_{ij}} B_{ij} \, = \mathrm{Tr}\left(\overline{\mathbf{A}^T} \mathbf{B}\right) \equiv \mathrm{Tr}\left(\mathbf{A}^{\!\dagger} \mathbf{B}\right) }[/math]

where the overline denotes the complex conjugate, and [math]\displaystyle{ \dagger }[/math] denotes Hermitian conjugate.[1] Explicitly this sum is

[math]\displaystyle{ \begin{align} \langle \mathbf{A}, \mathbf{B} \rangle_\mathrm{F} = & \overline{A}_{11} B_{11} + \overline{A}_{12} B_{12} + \cdots + \overline{A}_{1m} B_{1m} \\ & + \overline{A}_{21} B_{21} + \overline{A}_{22} B_{22} + \cdots + \overline{A}_{2m} B_{2m} \\ & \vdots \\ & + \overline{A}_{n1} B_{n1} + \overline{A}_{n2} B_{n2} + \cdots + \overline{A}_{nm} B_{nm} \\ \end{align} }[/math]

The calculation is very similar to the dot product, which in turn is an example of an inner product.[citation needed]

Relation to other products

If A and B are each real-valued matrices, the Frobenius inner product is the sum of the entries of the Hadamard product. If the matrices are vectorised (i.e., converted into column vectors, denoted by "[math]\displaystyle{ \mathrm{vec}(\cdot) }[/math]"), then

[math]\displaystyle{ \mathrm{vec}(\mathbf {A}) = {\begin{pmatrix} A_{11} \\ A_{12} \\ \vdots \\ A_{21} \\ A_{22} \\ \vdots \\ A_{nm} \end{pmatrix}},\quad \mathrm{vec}(\mathbf {B}) = {\begin{pmatrix} B_{11} \\ B_{12} \\ \vdots \\ B_{21} \\ B_{22} \\ \vdots \\ B_{nm} \end{pmatrix}} \,, }[/math][math]\displaystyle{ \quad \overline{\mathrm{vec}(\mathbf{A})}^T\mathrm{vec}(\mathbf {B}) = {\begin{pmatrix} \overline{A}_{11} & \overline{A}_{12} & \cdots & \overline{A}_{21} & \overline{A}_{22} & \cdots & \overline{A}_{nm} \end{pmatrix}} {\begin{pmatrix} B_{11} \\ B_{12} \\ \vdots \\ B_{21} \\ B_{22} \\ \vdots \\ B_{nm} \end{pmatrix}} }[/math]

Therefore

[math]\displaystyle{ \langle \mathbf{A}, \mathbf{B} \rangle_\mathrm{F} = \overline{\mathrm{vec}(\mathbf{A})}^T \mathrm{vec}(\mathbf{B}) \, . }[/math][citation needed]

Properties

Like any inner product, it is a sesquilinear form, for four complex-valued matrices A, B, C, D, and two complex numbers a and b:

[math]\displaystyle{ \langle a\mathbf{A}, b\mathbf{B} \rangle_\mathrm{F} = \overline{a}b\langle \mathbf{A}, \mathbf{B} \rangle_\mathrm{F} }[/math]
[math]\displaystyle{ \langle \mathbf{A}+\mathbf{C}, \mathbf{B} + \mathbf{D} \rangle_\mathrm{F} = \langle \mathbf{A}, \mathbf{B} \rangle_\mathrm{F} + \langle \mathbf{A}, \mathbf{D} \rangle_\mathrm{F} + \langle \mathbf{C}, \mathbf{B} \rangle_\mathrm{F} + \langle \mathbf{C}, \mathbf{D} \rangle_\mathrm{F} }[/math]

Also, exchanging the matrices amounts to complex conjugation:

[math]\displaystyle{ \langle \mathbf{B}, \mathbf{A} \rangle_\mathrm{F} = \overline{\langle \mathbf{A}, \mathbf{B} \rangle_\mathrm{F}} }[/math]

For the same matrix,

[math]\displaystyle{ \langle \mathbf{A}, \mathbf{A} \rangle_\mathrm{F} \geq 0 }[/math],[citation needed]

and,

[math]\displaystyle{ \langle \mathbf{A}, \mathbf{A} \rangle_\mathrm{F} = 0 \Longleftrightarrow \mathbf{A} = \mathbf{0} }[/math].

Frobenius norm

The inner product induces the Frobenius norm

[math]\displaystyle{ \|\mathbf{A}\|_\mathrm{F} = \sqrt{\langle \mathbf{A}, \mathbf{A} \rangle_\mathrm{F}} \,. }[/math][1]

Examples

Real-valued matrices

For two real-valued matrices, if

[math]\displaystyle{ \mathbf{A} = \begin{pmatrix} 2 & 0 & 6 \\ 1 & -1 & 2 \end{pmatrix} \,,\quad \mathbf{B} = \begin{pmatrix} 8 & -3 & 2 \\ 4 & 1 & -5 \end{pmatrix} }[/math]

then

[math]\displaystyle{ \begin{align}\langle \mathbf{A} ,\mathbf{B}\rangle_\mathrm{F} & = 2\cdot 8 + 0\cdot (-3) + 6\cdot 2 + 1\cdot 4 + (-1)\cdot 1 + 2\cdot(-5) \\ & = 21 \end{align} }[/math]

Complex-valued matrices

For two complex-valued matrices, if

[math]\displaystyle{ \mathbf{A} = \begin{pmatrix} 1+i & -2i \\ 3 & -5 \end{pmatrix} \,,\quad \mathbf{B} = \begin{pmatrix} -2 & 3i \\ 4-3i & 6 \end{pmatrix} }[/math]

then

[math]\displaystyle{ \begin{align} \langle \mathbf{A} ,\mathbf{B}\rangle_\mathrm{F} & = (1-i)\cdot (-2) + 2i\cdot 3i + 3\cdot (4-3i) + (-5)\cdot 6 \\ & = -26 -7i \end{align} }[/math]

while

[math]\displaystyle{ \begin{align} \langle \mathbf{B} ,\mathbf{A}\rangle_\mathrm{F} & = (-2)\cdot (1+i) + (-3i)\cdot (-2i) + (4+3i)\cdot 3 + 6 \cdot (-5) \\ & = -26 + 7i \end{align} }[/math]

The Frobenius inner products of A with itself, and B with itself, are respectively

[math]\displaystyle{ \langle \mathbf{A}, \mathbf{A} \rangle_\mathrm{F} = 2 + 4 + 9 + 25 = 40 }[/math][math]\displaystyle{ \qquad \langle \mathbf{B}, \mathbf{B} \rangle_\mathrm{F} = 4 + 9 + 25 + 36 = 74 }[/math]

See also

References

  1. 1.0 1.1 Horn, R.A.; C.R., Johnson (1985) (in en). Topics in Matrix Analysis (2nd ed.). Cambridge: Cambridge University Press. pp. 321. ISBN 978-0-521-83940-2.