mail  mail@stemandmusic.in
    
call  +91-9818088802
Donate

Double-Dot Product of 2 Matrices

  1. Double-Dot Product between any 2 Matrices can be done if Both the Matrices have Same Number of Rows and Same Number of Columns. The Double-Dot Product of 2 Matrices is a Scalar Value.
  2. The Double-Dot Product of 2 Matrices is calculated by Calculating their Hadamard Product and Adding up all the Elements of the Resulting Matrix.
  3. Given 2 \(M \times N\) Matrices, Matrix \(A\) having elements \(a_{ij}\) and Matrix \(B\) having elements \(b_{ij}\) as following

    \(A=\begin{bmatrix} a_{11} & a_{12} & ... & a_{1n}\\ a_{21} & a_{22} & ... & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\a_{m1} & a_{m2} & ... & a_{mn}\end{bmatrix} \hspace{.5cm}B=\begin{bmatrix} b_{11} & b_{12} & ... & b_{1n}\\ b_{21} & b_{22} & ... & b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\b_{m1} & b_{m2} & ... & b_{mn}\end{bmatrix}\)

    The Double-Dot Product of Matrices \(A\) and \(B\) is calculated as

    \(A:B = B:A = a_{11} \circ b_{11} + a_{12} \circ b_{12} + \cdots + a_{1n} \circ b_{1n} + a_{21} \circ b_{21} + a_{22} \circ b_{22} + \cdots + a_{2n} \circ b_{2n} + \cdots + a_{m1} \circ b_{m1} + a_{m2} \circ b_{m2} + \cdots + a_{mn} \circ b_{mn}\)
  4. Alternative Way to Calculate the Double-Dot Product of 2 Matrices is to find the Trace of following Inner/Dot Product of the 2 Matrices

    \(A:B = B:A = Trace(AB^T)=Trace(B^TA)=Trace(BA^T)=Trace(A^TB)\)
  5. Following example demonstrates calculating the Double-Dot Product of 2 Matrices. Let's consider Matrices \(A\) and \(B\) given as follows

    \(A=\begin{bmatrix} 2 & 5 \\ -4 & 1 \\ -7 & 3 \end{bmatrix}\hspace{.5cm} B=\begin{bmatrix} -6 & -7 \\ 2 & -3 \\ 9 & 4 \end{bmatrix}\)

    Double-Dot Product of \(A\) and \(B\) using Hadamard Product is calculated as

    \(A \circ B=B \circ A=\begin{bmatrix} 2 \circ -6 & 5 \circ -7\\ -4 \circ 2 & 1 \circ -3 \\ -7 \circ 9 & 3 \circ 4 \end{bmatrix}=\begin{bmatrix} -12 & -35 \\ -8 & -3 \\ -63 & 12 \end{bmatrix}\)

    \(\Rightarrow A:B=B:A= -12 + (-35) + (-8) + (-3) + (-63) + 12 = -109\)

    Double-Dot Product of \(A\) and \(B\) using Trace of Inner/Dot Product is calculated as

    \(AB^T=\begin{bmatrix} 2 & 5 \\ -4 & 1 \\ -7 & 3 \end{bmatrix}\begin{bmatrix} -6 & 2 & 9\\ -7 & -3 & 4 \end{bmatrix}=\begin{bmatrix} -47 & -11 & 38\\ 17 & -11 & -32 \\ 21 & -23 & -51 \end{bmatrix}\) \(\Rightarrow Trace(AB^T)=-47+(-11)+(-51)=-109\)

    \(B^TA=\begin{bmatrix} -6 & 2 & 9\\ -7 & -3 & 4 \end{bmatrix}\begin{bmatrix} 2 & 5 \\ -4 & 1 \\ -7 & 3 \end{bmatrix}=\begin{bmatrix} -83 & -1 \\ -30 & -26 \end{bmatrix}\) \(\Rightarrow Trace(B^TA)=-83+(-26)=-109\)

    \(BA^T=\begin{bmatrix} -6 & -7 \\ 2 & -3 \\ 9 & 4 \end{bmatrix}\begin{bmatrix} 2 & -4 & -7\\ 5 & 1 & 3\end{bmatrix}=\begin{bmatrix} -47 & 17 & 21\\ -11 & -11 & -23 \\ 38 & -32 & -51 \end{bmatrix}\) \(\Rightarrow Trace(BA^T)=-47+(-11)+(-51)=-109\)

    \(A^TB=\begin{bmatrix} 2 & -4 & -7\\ 5 & 1 & 3\end{bmatrix}\begin{bmatrix} -6 & -7 \\ 2 & -3 \\ 9 & 4 \end{bmatrix}=\begin{bmatrix} -83 & -30 \\ -1 & -26 \end{bmatrix}\) \(\Rightarrow Trace(A^TB)=-83+(-26)=-109\)
  6. If \(A\) and \(B\) are both Square Matrices of Same Order then the Double Dot Product can also be Calculated Between One Matrix and Transpose of the Other Matrix. This kind of calculation is called the Transpose Calculation of Double Dot Product of 2 Matrices. Under Transpose Calculation following relations hold true

    \(A:B^T = B^T:A = A^T:B = B:A^T = Trace(AB)=Trace(A^TB^T)=Trace(BA)=Trace(B^TA^T)\)

    Please note that the value of Double Dot Product for Normal Calculations and Transpose Calculations may be and most likely are Different.
    Transpose Calculation of Double Dot Product of 2 Matrices (along with Normal Calculation) is generally used for Double Dot Product calculations related to Dyads and Dyadics.
  7. You can use the Matrix Hadamard Product / Double Dot Product Calculator to calculate Double Dot Product of Matrices.
Related Calculators
Matrix Hadamard Product / Double Dot Product Calculator
Related Topics and Calculators
Hadamard Product: Element Wise Matrix Multiplication,    Dot Product of 2 Row/Column Matrices,    Matrix Multiplication: Inner Product of Matrices,    Kronecker Product: Outer Product of Matrices,    Tensor Product of Matrices,    Introduction to Matrix Algebra
© Invincible IDeAS. All Rights Reserved