Frobenius inner product explained

In mathematics, the Frobenius inner product is a binary operation that takes two matrices and returns a scalar. It is often denoted

\langleA,B\rangleF

. 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

A={\begin{pmatrix}A11&A12&&A1m\\A21&A22&&A2m\\\vdots&\vdots&\ddots&\vdots\\An1&An2&&Anm\\\end{pmatrix}},B={\begin{pmatrix}B11&B12&&B1m\\B21&B22&&B2m\\\vdots&\vdots&\ddots&\vdots\\Bn1&Bn2&&Bnm\\\end{pmatrix}},

the Frobenius inner product is defined as

\langleA,B\rangleF=\sumi,j\overline{Aij

} B_ \, = \mathrm\left(\overline \mathbf\right)\equiv\mathrm\left(\mathbf^ \mathbf\right),

where the overline denotes the complex conjugate, and

\dagger

denotes the Hermitian conjugate.[1] Explicitly, this sum is

\begin{align}\langleA,B\rangleF=&\overline{A}11B11+\overline{A}12B12++\overline{A}1mB1m\\ &+\overline{A}21B21+\overline{A}22B22++\overline{A}2mB2m\\ &\vdots\\ &+\overline{A}n1Bn1+\overline{A}n2Bn2++\overline{A}nmBnm\\ \end{align}

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

Relation to other products

If A and B are each real-valued matrices, then the Frobenius inner product is the sum of the entries of the Hadamard product. If the matrices are vectorized (i.e., converted into column vectors, denoted by "

vec()

"), then

vec(A)={\begin{pmatrix}A11\A12\\vdots\A21\A22\\vdots\Anm\end{pmatrix}},vec(B)={\begin{pmatrix}B11\B12\\vdots\B21\B22\\vdots\Bnm\end{pmatrix}},

\overline{vec(A)}Tvec(B)={\begin{pmatrix}\overline{A}11&\overline{A}12&&\overline{A}21&\overline{A}22&&\overline{A}nm\end{pmatrix}}{\begin{pmatrix}B11\B12\\vdots\B21\B22\\vdots\Bnm\end{pmatrix}}

Therefore

\langleA,B\rangleF=\overline{vec(A)}Tvec(B).

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:

\langleaA,bB\rangleF=\overline{a}b\langleA,B\rangleF

\langleA+C,B+D\rangleF=\langleA,B\rangleF+\langleA,D\rangleF+\langleC,B\rangleF+\langleC,D\rangleF

Also, exchanging the matrices amounts to complex conjugation:

\langleB,A\rangleF=\overline{\langleA,B\rangleF

}

For the same matrix,

\langleA,A\rangleF\geq0

,and,

\langleA,A\rangleF=0\LongleftrightarrowA=0

.

Frobenius norm

The inner product induces the Frobenius norm

\|A\|F=\sqrt{\langleA,A\rangleF

} \,.

Examples

Real-valued matrices

For two real-valued matrices, if

A=\begin{pmatrix}2&0&6\ 1&-1&2\end{pmatrix},B=\begin{pmatrix}8&-3&2\ 4&1&-5\end{pmatrix},

then

\begin{align}\langleA,B\rangleF&=2 ⋅ 8+0 ⋅ (-3)+6 ⋅ 2+1 ⋅ 4+(-1)1+2 ⋅ (-5)\\ &=21.\end{align}

Complex-valued matrices

For two complex-valued matrices, if

A=\begin{pmatrix}1+i&-2i\ 3&-5\end{pmatrix},B=\begin{pmatrix}-2&3i\ 4-3i&6\end{pmatrix},

then

\begin{align}\langleA,B\rangleF&=(1-i)(-2)+2i3i+3 ⋅ (4-3i)+(-5)6\\ &=-26-7i,\end{align}

while

\begin{align}\langleB,A\rangleF&=(-2)(1+i)+(-3i)(-2i)+(4+3i)3+6(-5)\\ &=-26+7i.\end{align}

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

\langleA,A\rangleF=2+4+9+25=40

   \langleB,B\rangleF=4+9+25+36=74.

See also

References

  1. Book: Horn, R.A. . Topics in Matrix Analysis . C.R. . Johnson . . 1985 . 978-0-521-83940-2 . 2nd . Cambridge . 321 . en.