1
$\begingroup$

Say, $A=(a_{ij})$ and $B=(b_{ij})$ are two $n$ by $n$ matrices. Does the expression $$\sum_{i=1}^n \sum_{j=1}^n a_{ij}b_{ij} $$ have a name? Is there a neat way to write it in terms of $A$ and $B$?

I encountered the expression in the context of optimization. Is there any other context it comes up?

  • 0
    The expression is similar to dot product of euclidean spaces.2017-01-04
  • 0
    $$\mathrm{tr}(AB^T)$$2017-01-04

2 Answers 2

2

Can't comment yet...

Supposing your matrices have real entries, this is the Frobenius inner product https://en.wikipedia.org/wiki/Frobenius_inner_product.

  • 1
    Why would you want to comment if this qualifies as an answer! Thanks.2017-01-04
  • 0
    Actually, you are right.2017-01-04
2

It is the dot product of the two matrices $\mathbf{A}$ and $\mathbf{B}$.

For $\mathbf{A} = (a_{i,j})_{1 \leq i,j \leq n}$ and $\mathbf{B} = (b_{i,j})_{1 \leq i,j \leq n}$ two real matrices, the dot product of $\mathbf{A}$ and $\mathbf{B}$ is :

$$ \left\langle \mathbf{A},\mathbf{B} \right\rangle = \mathrm{tr}\big( \mathbf{A}^{\top} \mathbf{B} \big) = \sum_{i=1}^{n} \sum_{l=1}^{n} a_{li}b_{li}. $$

It is related to the Euclidean inner product on $\mathbb{R}^{n^2}$ as follows :

$$ \left\langle \mathbf{A}, \mathbf{B} \right\rangle = \mathrm{vec}(\mathbf{A})^{\top} \mathrm{vec}(\mathbf{B}) $$

where $\mathrm{vec}$ denotes the vectorization operator.