This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Frobenius inner product" – news · newspapers · books · scholar · JSTOR (March 2017) (Learn how and when to remove this template message)

In mathematics, the Frobenius inner product is a binary operation that takes two matrices and returns a number. It is often denoted $\langle \mathbf {A} ,\mathbf {B} \rangle _{\mathrm {F} )$ . The operation is a component-wise inner product of two matrices as though they are vectors. 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

$\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))$ the Frobenius inner product is defined as,

$\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)$ where the overline denotes the complex conjugate, and $\dagger$ denotes Hermitian conjugate. Explicitly this sum is

{\begin{aligned}\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{aligned)) 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, 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 "$\mathrm {vec} (\cdot )$ "), then

$\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))\,,$ $\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))$ Therefore

$\langle \mathbf {A} ,\mathbf {B} \rangle _{\mathrm {F} }={\overline {\mathrm {vec} (\mathbf {A} )))^{T}\mathrm {vec} (\mathbf {B} )\,.$ Properties

It is a sesquilinear form, for four complex-valued matrices A, B, C, D, and two complex numbers a and b:

$\langle a\mathbf {A} ,b\mathbf {B} \rangle _{\mathrm {F} }={\overline {a))b\langle \mathbf {A} ,\mathbf {B} \rangle _{\mathrm {F} )$ $\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} )$ Also, exchanging the matrices amounts to complex conjugation:

$\langle \mathbf {B} ,\mathbf {A} \rangle _{\mathrm {F} }={\overline {\langle \mathbf {A} ,\mathbf {B} \rangle _{\mathrm {F} )))$ For the same matrix,

$\langle \mathbf {A} ,\mathbf {A} \rangle _{\mathrm {F} }\geq 0\,.$ Frobenius norm

The inner product induces the Frobenius norm

$\|\mathbf {A} \|_{\mathrm {F} }={\sqrt {\langle \mathbf {A} ,\mathbf {A} \rangle _{\mathrm {F} ))}\,.$ Examples

Real-valued matrices

For two real-valued matrices, if

$\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))$ then

{\begin{aligned}\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{aligned)) Complex-valued matrices

For two complex-valued matrices, if

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

{\begin{aligned}\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{aligned)) while

{\begin{aligned}\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{aligned)) The Frobenius inner products of A with itself, and B with itself, are respectively

$\langle \mathbf {A} ,\mathbf {A} \rangle _{\mathrm {F} }=2+4+9+25=40$ $\qquad \langle \mathbf {B} ,\mathbf {B} \rangle _{\mathrm {F} }=4+9+25+36=74$
{"ft_lang_label":"__label__en","ft_lang_prob":0.8820673,"math_prob":0.99993384,"size":1753,"snap":"2022-05-2022-21","text_gpt3_token_len":390,"char_repetition_ratio":0.17381361,"word_repetition_ratio":0.010830325,"special_character_ratio":0.19737592,"punctuation_ratio":0.11285266,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000032,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"im_url_duplicate_count":[null,1,null,2,null,1,null,null,null,2,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-01-24T05:09:41Z\",\"WARC-Record-ID\":\"<urn:uuid:da5e91c0-3b66-4ea5-a1cd-90032d53fa7c>\",\"Content-Length\":\"100284\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:30b21f35-5be3-4059-ab61-708f3be11c11>\",\"WARC-Concurrent-To\":\"<urn:uuid:7cbff2ce-4217-49b3-815d-ba3cfec26d81>\",\"WARC-IP-Address\":\"13.225.205.60\",\"WARC-Target-URI\":\"https://db0nus869y26v.cloudfront.net/en/Frobenius_inner_product\",\"WARC-Payload-Digest\":\"sha1:OBNAZI34YJPEAX2WSMTBQKBOOK65CIJV\",\"WARC-Block-Digest\":\"sha1:VVJNFCCFNAOOBLOT3TKDGC36WJ73MHC2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-05/CC-MAIN-2022-05_segments_1642320304471.99_warc_CC-MAIN-20220124023407-20220124053407-00296.warc.gz\"}"}