Problems with Solutions

Problem 1. \(\,\) Let \(\ \boldsymbol{A}\,=\,[\,a_{ij}\,]_{\,2\times 2}\ \) be an arbitrary square matrix of size two over a field \(\ K.\ \) For \(\ n=2\ \) and \(\ 3\ \) show directly, that the matrix \(\ \boldsymbol{A}\otimes\boldsymbol{I}_n\ \) may be converted into \(\,\boldsymbol{I}_n\otimes\boldsymbol{A}\ \) by means of some transpositions of rows \(\ R_i\ \) associated with the same transpositions of columns \(\ C_j\quad (i,j=1,\ldots,n).\ \) Determine the permutation matrices \(\ \boldsymbol{P}\ \) and \(\ \boldsymbol{Q}\ \) in the relation

\[\boldsymbol{I}_n\otimes\boldsymbol{A}\ \, = \ \, \boldsymbol{P}\ (\boldsymbol{A}\otimes\boldsymbol{I}_n)\ \boldsymbol{Q}\,.\]

Verify that \(\,\boldsymbol{Q} = \boldsymbol{P}^T = \boldsymbol{P}^{-1},\ \) meaning that \(\,\boldsymbol{P}\ \) and \(\,\boldsymbol{Q}\ \) are, \(\,\) respectively, \(\,\) the row and column permutation matrices of the same permutation \(\,\sigma.\ \) Write down \(\,\sigma\,\) in a two-line form.

Solution \(\,\) for \(\,\) \(n=2.\ \)

\[\begin{split}\begin{array}{rrr} \boldsymbol{A}\otimes\boldsymbol{I}_2 & =\ \ \left[\begin{array}{cc} a_{11}\ \boldsymbol{I}_2 & a_{12}\ \boldsymbol{I}_2 \\ a_{21}\ \boldsymbol{I}_2 & a_{22}\ \boldsymbol{I}_2 \end{array}\right]\ \ =\ \ \left[\begin{array}{cc|cc} a_{11} & 0 & a_{12} & 0 \\ 0 & a_{11} & 0 & a_{12} \\ \hline a_{21} & 0 & a_{22} & 0 \\ 0 & a_{21} & 0 & a_{22} \end{array}\right]\ \ \rightarrow & \end{array} \\[7pt] \begin{array}{rcl} & \ \ R_2\leftrightarrow R_3: \qquad\qquad\qquad\qquad C_2\leftrightarrow C_3: & \\[3pt] & \rightarrow\ \ \left[\begin{array}{cccc} a_{11} & 0 & a_{12} & 0 \\ a_{21} & 0 & a_{22} & 0 \\ 0 & a_{11} & 0 & a_{12} \\ 0 & a_{21} & 0 & a_{22} \end{array}\right]\ \ \rightarrow\ \ \left[\begin{array}{cc|cc} a_{11} & a_{12} & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 \\ \hline 0 & 0 & a_{11} & a_{12} \\ 0 & 0 & a_{21} & a_{22} \end{array}\right]\ \ =\ & \boldsymbol{I}_2\otimes\boldsymbol{A}\,. \end{array} \\[4pt]\end{split}\]

The transformation of matrix \(\ \boldsymbol{A}\otimes\boldsymbol{I}_2\ \) into \(\ \boldsymbol{I}_2\otimes\boldsymbol{A}\ \) proceeds in one double step:

(1)\[\boldsymbol{I}_2\otimes\boldsymbol{A}\ \, =\ \, \boldsymbol{P}_{23}\ (\boldsymbol{A}\otimes\boldsymbol{I}_2)\ \boldsymbol{Q}_{23}\,,\]

where \(\ \boldsymbol{P}_{23}\ \) is the matrix of transposition of rows (the second and the third), \(\\\) whilst \(\ \,\boldsymbol{Q}_{23}\ \) is the matrix of transposition of columns (the second and the third). \(\\\) These operations are performed by the following Sage code:

sage: A = matrix([[var("a%d%d" % (k,l)) for l in [1,2]]
                                        for k in [1,2]])
sage: I2 = identity_matrix(2)

sage: AxI2 = A.tensor_product(I2)

sage: P23 = elementary_matrix(4, row1=1, row2=2)
sage: Q23 = elementary_matrix(4, col1=1, col2=2)

sage: I2xA = P23 * AxI2 * Q23
sage: I2xA.subdivide(2,2)

sage: (AxI2, I2xA)

(
[a11   0|a12   0]  [a11 a12|  0   0]
[  0 a11|  0 a12]  [a21 a22|  0   0]
[-------+-------]  [-------+-------]
[a21   0|a22   0]  [  0   0|a11 a12]
[  0 a21|  0 a22], [  0   0|a21 a22]
)

Solution \(\,\) for \(\,\) \(n=3\ \)

\[\begin{split}\begin{array}{llll} \boldsymbol{A}\otimes\boldsymbol{I}_3 & \ =\ \ \ \left[\begin{array}{cc} a_{11}\ \boldsymbol{I}_3 & a_{12}\ \boldsymbol{I}_3 \\ a_{21}\ \boldsymbol{I}_3 & a_{22}\ \boldsymbol{I}_3 \end{array}\right]\ \ =\ \ & \left[\begin{array}{ccc|ccc} a_{11} & 0 & 0 & a_{12} & 0 & 0 \\ 0 & a_{11} & 0 & 0 & a_{12} & 0 \\ 0 & 0 & a_{11} & 0 & 0 & a_{12} \\ \hline a_{21} & 0 & 0 & a_{22} & 0 & 0 \\ 0 & a_{21} & 0 & 0 & a_{22} & 0 \\ 0 & 0 & a_{21} & 0 & 0 & a_{22} \end{array}\right]\ \ \rightarrow & \qquad\quad \end{array} \\[10pt] \begin{array}{ccc} R_2\leftrightarrow R_4: & C_2\leftrightarrow C_4: \\[5pt] \rightarrow\ \ \left[\begin{array}{cccccc} a_{11} & 0 & 0 & a_{12} & 0 & 0 \\ a_{21} & 0 & 0 & a_{22} & 0 & 0 \\ 0 & 0 & a_{11} & 0 & 0 & a_{12} \\ 0 & a_{11} & 0 & 0 & a_{12} & 0 \\ 0 & a_{21} & 0 & 0 & a_{22} & 0 \\ 0 & 0 & a_{21} & 0 & 0 & a_{22} \end{array}\right] & \rightarrow\ \ \left[\begin{array}{cccccc} a_{11} & a_{12} & 0 & 0 & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 & 0 & 0 \\ 0 & 0 & a_{11} & 0 & 0 & a_{12} \\ 0 & 0 & 0 & a_{11} & a_{12} & 0 \\ 0 & 0 & 0 & a_{21} & a_{22} & 0 \\ 0 & 0 & a_{21} & 0 & 0 & a_{22} \end{array}\right]\ \ \rightarrow & \end{array} \\[10pt] \begin{array}{ccc} R_4\leftrightarrow R_6: & C_4\leftrightarrow C_6: \\[5pt] \rightarrow\ \ \left[\begin{array}{cccccc} a_{11} & a_{12} & 0 & 0 & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 & 0 & 0 \\ 0 & 0 & a_{11} & 0 & 0 & a_{12} \\ 0 & 0 & a_{21} & 0 & 0 & a_{22} \\ 0 & 0 & 0 & a_{21} & a_{22} & 0 \\ 0 & 0 & 0 & a_{11} & a_{12} & 0 \end{array}\right] & \rightarrow\ \ \left[\begin{array}{cccccc} a_{11} & a_{12} & 0 & 0 & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 & 0 & 0 \\ 0 & 0 & a_{11} & a_{12} & 0 & 0 \\ 0 & 0 & a_{21} & a_{22} & 0 & 0 \\ 0 & 0 & 0 & 0 & a_{22} & a_{21} \\ 0 & 0 & 0 & 0 & a_{12} & a_{11} \end{array}\right] \ \ \rightarrow & \end{array} \\[10pt] \begin{array}{ccc} R_5\leftrightarrow R_6: & C_5\leftrightarrow C_6: \\[5pt] \rightarrow\ \ \left[\begin{array}{cccccc} a_{11} & a_{12} & 0 & 0 & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 & 0 & 0 \\ 0 & 0 & a_{11} & a_{12} & 0 & 0 \\ 0 & 0 & a_{21} & a_{22} & 0 & 0 \\ 0 & 0 & 0 & 0 & a_{12} & a_{11} \\ 0 & 0 & 0 & 0 & a_{22} & a_{21} \end{array}\right] & \rightarrow\ \ \left[\begin{array}{cc|cc|cc} a_{11} & a_{12} & 0 & 0 & 0 & 0 \\ a_{21} & a_{22} & 0 & 0 & 0 & 0 \\ \hline 0 & 0 & a_{11} & a_{12} & 0 & 0 \\ 0 & 0 & a_{21} & a_{22} & 0 & 0 \\ \hline 0 & 0 & 0 & 0 & a_{11} & a_{12} \\ 0 & 0 & 0 & 0 & a_{21} & a_{22} \end{array}\right] \ \ = & \boldsymbol{I}_3\otimes\boldsymbol{A}\,. \end{array} \\[10pt]\end{split}\]

The operations performed on rows and columns of the matrix \(\ \boldsymbol{A}\otimes\boldsymbol{I}_3\ \) may be written as

(2)\[\begin{split}\begin{array}{lll} \boldsymbol{I}_3\otimes\boldsymbol{A} & =\ \boldsymbol{P}_{56}\,\{\,\boldsymbol{P}_{46}\,[\,\boldsymbol{P}_{24}\, (\boldsymbol{A}\otimes\boldsymbol{I}_3)\, \boldsymbol{Q}_{24}\,]\,\boldsymbol{Q}_{46}\,\}\,\boldsymbol{Q}_{56} \ = & \\[7pt] & =\ \ (\boldsymbol{P}_{56}\,\boldsymbol{P}_{46}\,\boldsymbol{P}_{24})\ (\boldsymbol{A}\otimes\boldsymbol{I}_3)\ (\boldsymbol{Q}_{24}\,\boldsymbol{Q}_{46}\,\boldsymbol{Q}_{56})\ \ \equiv & \boldsymbol{P}\ (\boldsymbol{A}\otimes\boldsymbol{I}_3)\ \boldsymbol{Q}. \end{array}\end{split}\]

Thus \(\ \boldsymbol{P} = \boldsymbol{P}_{56}\ \boldsymbol{P}_{46}\ \boldsymbol{P}_{24}\,,\ \) \(\ \boldsymbol{Q} = \boldsymbol{Q}_{24}\ \boldsymbol{Q}_{46}\ \boldsymbol{Q}_{56}\,,\ \) where \(\ \boldsymbol{P}_{ij}\ \) is a matrix of transposition of rows \(\ i,j\,,\ \,\) and \(\ \, \boldsymbol{Q}_{ij}\ \) \(\ -\ \ \) a matrix of transposition of columns \(\ i,j\,,\ \) \(\ (i<j=1,2,\ldots,6.)\)

In view of the relations \(\ \boldsymbol{Q}_{ij} = \boldsymbol{P}_{ij}^{\,T} = \boldsymbol{P}_{ij}^{-1}\,,\ \ i<j=1,2,\ldots,6\,,\ \) we obtain

\[\begin{split}\begin{array}{ll} \boldsymbol{Q}\ =\ \boldsymbol{Q}_{24}\ \boldsymbol{Q}_{46}\ \boldsymbol{Q}_{56} & =\ \boldsymbol{P}_{24}^{\,T}\ \boldsymbol{P}_{46}^{\,T}\ \boldsymbol{P}_{56}^{\,T}\ =\ \left(\boldsymbol{P}_{56}\ \boldsymbol{P}_{46}\ \boldsymbol{P}_{24}\right)^T\ =\ \boldsymbol{P}^{\,T}, \\[7pt] & =\ \boldsymbol{P}_{24}^{-1}\ \boldsymbol{P}_{46}^{-1}\ \boldsymbol{P}_{56}^{-1}\ =\ \left(\boldsymbol{P}_{56}\ \boldsymbol{P}_{46}\ \boldsymbol{P}_{24}\right)^{-1}\ =\ \boldsymbol{P}^{-1}, \end{array}\end{split}\]

hence \(\ \ \boldsymbol{Q}\ \,=\ \,\boldsymbol{P}^{\,T}\ =\ \, \boldsymbol{P}^{-1},\ \ \) which was to be verified.

A practical conclusion: \(\quad \det{(\boldsymbol{A}\otimes\boldsymbol{I}_3)}\,=\, \det{(\boldsymbol{I}_3\otimes\boldsymbol{A})}\,=\,(\det{\boldsymbol{A}})^3.\)

The matrices \(\ \boldsymbol{P}\ \) and \(\ \boldsymbol{Q}\ \) shall be determined numerically, remembering that in Sage:

  • the numbering of rows and columns starts at zero;

  • the matrix \(\ \boldsymbol{P}_{ij}\ \) of transposition of rows is an elementary matrix,
    obtained from the identity matrix by swapping \(\ i\)-th and \(\ j\)-th rows;
    \(\ \boldsymbol{P}_{ij}\ \) transforms any given matrix by multiplying it from the left;
  • the matrix \(\ \boldsymbol{Q}_{ij}\ \) of transposition of columns is an elementary matrix,
    obtained from the identity matrix by swapping \(\ i\)-th and \(\ j\)-th columns;
    \(\ \boldsymbol{Q}_{ij}\ \) transforms any given matrix by multiplying it from the right.
sage: P24 = elementary_matrix(6, row1=1, row2=3)
sage: P46 = elementary_matrix(6, row1=3, row2=5)
sage: P56 = elementary_matrix(6, row1=4, row2=5)
sage: P = P56*P46*P24

sage: Q24 = elementary_matrix(6, col1=1, col2=3)
sage: Q46 = elementary_matrix(6, col1=3, col2=5)
sage: Q56 = elementary_matrix(6, col1=4, col2=5)
sage: Q = Q24*Q46*Q56

sage: (P,Q)

(
[1 0 0 0 0 0]  [1 0 0 0 0 0]
[0 0 0 1 0 0]  [0 0 0 0 1 0]
[0 0 1 0 0 0]  [0 0 1 0 0 0]
[0 0 0 0 0 1]  [0 1 0 0 0 0]
[0 1 0 0 0 0]  [0 0 0 0 0 1]
[0 0 0 0 1 0], [0 0 0 1 0 0]
)

Now we shall verify numerically the relation (2):

sage: A = matrix([[var("a%d%d" % (k,l)) for l in [1,2]]
                                        for k in [1,2]])
sage: I3 = identity_matrix(3)

sage: AxI3 = A.tensor_product(I3)
sage: I3xA = P * AxI3 * Q
sage: I3xA.subdivide([2,4],[2,4])

sage: (AxI3, I3xA)

(
                           [a11 a12|  0   0|  0   0]
[a11   0   0|a12   0   0]  [a21 a22|  0   0|  0   0]
[  0 a11   0|  0 a12   0]  [-------+-------+-------]
[  0   0 a11|  0   0 a12]  [  0   0|a11 a12|  0   0]
[-----------+-----------]  [  0   0|a21 a22|  0   0]
[a21   0   0|a22   0   0]  [-------+-------+-------]
[  0 a21   0|  0 a22   0]  [  0   0|  0   0|a11 a12]
[  0   0 a21|  0   0 a22], [  0   0|  0   0|a21 a22]
)

Let \(\ \sigma\in S_6\ \) be the permutation of rows and columns, which converts the matrix \(\ \boldsymbol{A}\otimes\boldsymbol{I}_3\ \) into \(\ \boldsymbol{I}_3\otimes\boldsymbol{A}.\ \) Remembering the definitions of permutation matrices in row and column version, the permutation \(\ \sigma\ \) may be easily determined from the matrix \(\ \boldsymbol{P}\ \) or \(\ \boldsymbol{Q}\ \) calculated above.

To obtain \(\ \sigma\ \) in a standard two-line notation, we note that if the arguments in the first line are naturally ordered: \(\ \boldsymbol{r}_1\,=\,(1,\,2,\,3,\,4,\,5,\,6),\ \) then the second line of corresponding values is given by \(\ \boldsymbol{r}_2\ =\ \boldsymbol{r}_1\cdot\,\boldsymbol{Q}\,.\ \) The Sage code returns \(\ \sigma\,\) calculated in this way:

sage: r1 = vector([1,2,3,4,5,6])
sage: r2 = r1 * Q
sage: sigma = matrix([r1,r2])
sage: sigma

[1 2 3 4 5 6]
[1 4 3 6 2 5]

The permutation in demand is therefore \(\ \,\sigma\ = \ \left(\begin{array}{cccccc} 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 4 & 3 & 6 & 2 & 5 \end{array}\right)\,.\)

The permutation \(\sigma\) may also be calculated by composing the transpositions corresponding to row permutation matrices \(\ \boldsymbol{P}_{ij}\ \) or column permutation matrices \(\ \boldsymbol{Q}_{ij}\,,\ \ \) taking into account \(\\\) the rules of their multiplication:

\[\boldsymbol{P}_{\rho}\,\cdot\, \boldsymbol{P}_{\sigma}\,\cdot\, \boldsymbol{P}_{\tau}\, = \ \boldsymbol{P}_{\tau\ \circ\ \sigma\ \circ\ \rho} \,,\qquad \boldsymbol{Q}_{\rho}\ \cdot\ \boldsymbol{Q}_{\sigma}\ \cdot\ \boldsymbol{Q}_{\tau}\, =\ \boldsymbol{Q}_{\rho\ \circ\ \sigma\ \circ\ \tau} \,,\qquad \forall\ \rho,\,\sigma,\,\tau\in S_6\,.\]

That way both products of matrices, \(\ \boldsymbol{P}_{56}\ \boldsymbol{P}_{46}\ \boldsymbol{P}_{24}\ \) and \(\ \boldsymbol{Q}_{24}\ \boldsymbol{Q}_{46}\ \boldsymbol{Q}_{56}\,,\ \) correspond to the same product of transpositions \(\ \tau_{24}\ \tau_{46}\ \tau_{56}\,.\ \) This yields again the permutation \(\ \sigma:\)

\[\begin{split}\begin{array}{ll} \sigma & = \ \ \tau_{24}\ \tau_{46}\ \tau_{56}\ \ = \\[9pt] & =\ \ \left(\begin{array}{cccccc} 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 4 & 3 & 2 & 5 & 6 \end{array}\right)\ \left(\begin{array}{cccccc} 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 2 & 3 & 6 & 5 & 4 \end{array}\right)\ \left(\begin{array}{cccccc} 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 2 & 3 & 4 & 6 & 5 \end{array}\right)\ \ = \\[10pt] & = \ \ \left(\begin{array}{cccccc} 1 & 2 & 3 & 4 & 5 & 6 \\ 1 & 4 & 3 & 6 & 2 & 5 \end{array}\right). \end{array}\end{split}\]

\(\,\)

Problem 2. \(\,\) Let \(\ \,\boldsymbol{A}\in M_{m\times n}(K),\ \) \(\ \boldsymbol{B},\,\boldsymbol{B}_1,\boldsymbol{B}_2 \in M_{p\times q}(K).\ \) Using the relation

(3)\[(\boldsymbol{A}\otimes\boldsymbol{B})\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) \ \,=\ \, \boldsymbol{\Lambda}^{mp} (\boldsymbol{A}\,\boldsymbol{G}\boldsymbol{B}^T)\,, \qquad\forall\ \ \boldsymbol{G}\in M_{n\times q}(K)\,,\]

where \(\ \boldsymbol{\Lambda}^{rs}(\boldsymbol{X})\ \) is a column of coordinates of the matrix \(\ \boldsymbol{X}\in M_{r\times s}(K)\ \) in the basis \(\ \mathcal{E}_{r\times s}\,,\)

prove the following properties of the tensor product of matrices:

\[ \begin{align}\begin{aligned}\boldsymbol{A}\otimes(\boldsymbol{B}_1 +\,\boldsymbol{B}_2)\ \,=\ \, (\boldsymbol{A}\otimes\boldsymbol{B}_1)\ +\ (\boldsymbol{A}\otimes\boldsymbol{B}_2)\,,\\(\gamma\,\boldsymbol{A})\otimes\boldsymbol{B}\ =\ \boldsymbol{A}\otimes(\gamma\,\boldsymbol{B})\ =\ \gamma\ (\boldsymbol{A}\otimes\boldsymbol{B}),\quad\gamma\in K.\end{aligned}\end{align} \]

Solution. \(\,\) Substituting in (3) \(\ \,\boldsymbol{B}\to\boldsymbol{B}_1 + \boldsymbol{B}_2\,,\ \) where \(\ \boldsymbol{B}_1,\ \boldsymbol{B}_2 \in M_{p\times q}(K),\ \) we get

\[\begin{split}\begin{array}{ll} \left[\,\boldsymbol{A}\otimes\, (\boldsymbol{B}_1 + \boldsymbol{B}_2)\,\right] \,\cdot\,\boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) & =\ \ \boldsymbol{\Lambda}^{mp} \left[\,\boldsymbol{A}\ \boldsymbol{G}\ (\boldsymbol{B}_1 + \boldsymbol{B}_2)^T\,\right]\ = \\[6pt] & =\ \ \boldsymbol{\Lambda}^{mp} \left[\,\boldsymbol{A}\ \boldsymbol{G}\ (\boldsymbol{B}_1^T + \boldsymbol{B}_2^T)\,\right]\ = \\[6pt] & =\ \ \boldsymbol{\Lambda}^{mp} \left(\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}_1^T + \, \boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}_2^T\right)\ = \\[6pt] & =\ \ \boldsymbol{\Lambda}^{mp} \left(\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}_1^T\right)\ +\ \boldsymbol{\Lambda}^{mp} \left(\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}_2^T\right)\ = \\[6pt] & =\ \ (\boldsymbol{A}\otimes\boldsymbol{B}_1)\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G})\ +\ (\boldsymbol{A}\otimes\boldsymbol{B}_2)\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G})\ = \\[6pt] & =\ \ \left[\,(\boldsymbol{A}\otimes\boldsymbol{B}_1)\ +\ (\boldsymbol{A}\otimes\boldsymbol{B}_2)\,\right]\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) \end{array}\end{split}\]

for arbitrary matrix \(\ \boldsymbol{G}\in M_{n\times q}(K).\ \) Inserting, in place of \(\ \boldsymbol{G},\ \) the consecutive matrices of the standard basis \(\ \mathcal{E}_{n\times q}:\ \) \(\ \boldsymbol{G} = \boldsymbol{E}_{11},\ \boldsymbol{E}_{12},\ \ldots,\ \boldsymbol{E}_{nq}\,,\ \) we come up with equality of the corresponding columns of matrices \(\ \boldsymbol{A}\otimes(\boldsymbol{B}_1 +\,\boldsymbol{B}_2)\ \,\) and \(\ (\boldsymbol{A}\otimes\boldsymbol{B}_1)\ +\ (\boldsymbol{A}\otimes\boldsymbol{B}_2)\,,\ \) which is equivalent to the matrix equality in demand:

\[\boldsymbol{A}\otimes(\boldsymbol{B}_1 +\,\boldsymbol{B}_2)\ \,=\ \, (\boldsymbol{A}\otimes\boldsymbol{B}_1)\ +\ (\boldsymbol{A}\otimes\boldsymbol{B}_2)\,.\quad\bullet\]

Substituting in (3) \(\ \,\boldsymbol{A}\to\gamma\,\boldsymbol{A}\,,\ \) where \(\ \gamma\in K,\ \) we get

\[\begin{split}\begin{array}{ll} \left[\,(\gamma\,\boldsymbol{A})\otimes\boldsymbol{B}\,\right] \,\cdot\,\boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) & =\ \ \boldsymbol{\Lambda}^{mp} \left[\,(\gamma\,\boldsymbol{A})\ \boldsymbol{G}\,\boldsymbol{B}^T\,\right]\ = \\[6pt] & =\ \ \boldsymbol{\Lambda}^{mp} \left[\, \gamma\ (\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}^T) \right]\ = \\[6pt] & =\ \ \gamma\,\cdot\,\boldsymbol{\Lambda}^{mp} \left(\,\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}^T\,\right)\ = \\[6pt] & =\ \ \gamma\,\cdot\, \left[\,(\boldsymbol{A}\otimes\boldsymbol{B})\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G})\,\right]\ = \\[6pt] & =\ \ \left[\, \gamma\,\cdot\,(\boldsymbol{A}\otimes\boldsymbol{B})\, \right]\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) \end{array}\end{split}\]

for arbitrary matrix \(\ \boldsymbol{G}\in M_{n\times q}(K).\ \) This is equivalent to the matrix equality

\[(\gamma\,\boldsymbol{A})\otimes\boldsymbol{B}\ \,=\ \, \gamma\ \,(\boldsymbol{A}\otimes\boldsymbol{B}),\quad\gamma\in K. \quad\bullet\]

On the other hand, substituting in (3) \(\ \boldsymbol{B}\to\gamma\,\boldsymbol{B}\,,\ \) where \(\ \gamma\in K,\ \) we obtain

\[\begin{split}\begin{array}{ll} \left[\,\boldsymbol{A}\otimes(\gamma\,\boldsymbol{B})\,\right] \,\cdot\,\boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) & =\ \ \boldsymbol{\Lambda}^{mp} \left[\,\boldsymbol{A}\ \boldsymbol{G}\ (\gamma\,\boldsymbol{B})^T\,\right]\ = \\[6pt] & =\ \ \boldsymbol{\Lambda}^{mp} \left[\,\boldsymbol{A}\ \boldsymbol{G}\ (\gamma\,\boldsymbol{B}^T)\,\right]\ = \\[6pt] & =\ \ \boldsymbol{\Lambda}^{mp} \left[\, \gamma\ (\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}^T)\, \right]\ = \\[6pt] & =\ \ \gamma\,\cdot\,\boldsymbol{\Lambda}^{mp} \left(\,\boldsymbol{A}\,\boldsymbol{G}\,\boldsymbol{B}^T\,\right)\ = \\[6pt] & =\ \ \gamma\,\cdot\, \left[\,(\boldsymbol{A}\otimes\boldsymbol{B})\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G})\,\right]\ = \\[6pt] & =\ \ \left[\, \gamma\,\cdot\,(\boldsymbol{A}\otimes\boldsymbol{B})\, \right]\,\cdot\, \boldsymbol{\Lambda}^{nq}(\boldsymbol{G}) \end{array}\end{split}\]

for arbitrary matrix \(\ \boldsymbol{G}\in M_{n\times q}(K),\ \) whereby

\[\boldsymbol{A}\otimes(\gamma\,\boldsymbol{B})\ =\ \gamma\ (\boldsymbol{A}\otimes\boldsymbol{B}), \quad\gamma\in K.\quad\bullet\]

Problem 3. \(\\\) Given the matrices \(\,\boldsymbol{A}=[a_{ij}]_{m\times m}\,,\ \) \(\,\boldsymbol{B}=[b_{ij}]_{n\times n}\ \) and \(\,\boldsymbol{C}=[c_{ij}]_{m\times n}\ \) over a field \(\,K,\ \) consider a matrix equation

(4)\[\boldsymbol{A}\,\boldsymbol{X}\,\boldsymbol{B}\ =\ \boldsymbol{C}\]

with the unknown matrix \(\,\boldsymbol{X}=[x_{ij}]_{m\times n}\,.\ \) Prove that Equation (4) has a unique solution if, and only if, the matrices \(\,\boldsymbol{A}\ \) and \(\,\boldsymbol{B}\ \) are non-singular.

Solution. \(\,\) Equation (4) implies that

\[ \begin{align}\begin{aligned}c_{ij}\ = \ \displaystyle\sum_{k=1}^m\sum_{l=1}^n\ a_{ik}\ x_{kl}\ b_{lj}\ = \ \displaystyle\sum_{k=1}^m\sum_{l=1}^n\ a_{ik}\ b_{jl}^{\,T}\ x_{kl}\ = \ \displaystyle\sum_{k=1}^m\sum_{l=1}^n\ \left(\boldsymbol{A}\otimes\boldsymbol{B}^{\,T}\right)_{ij,\,kl}\ x_{kl}\,,\\i=1,2,\ldots,m;\ j=1,2,\ldots,n.\end{aligned}\end{align} \]

The above \(\,mn\,\) equations may be rewritten in a compact matrix form:

(5)\[\boldsymbol{\Lambda}^{mn}(\boldsymbol{C})\ =\ (\boldsymbol{A}\otimes\boldsymbol{B}^{\,T})\ \cdot\ \boldsymbol{\Lambda}^{mn}(\boldsymbol{X})\,.\]

That way, the matrix equation (4) has been converted into a standard linear system with the square coefficient matrix \(\,\boldsymbol{A}\otimes\boldsymbol{B}^{\,T}\in M_{mn\times mn}(K)\,,\ \) the column of unknowns \(\,\boldsymbol{\Lambda}^{mn}(\boldsymbol{X})\ \) and the column of constants \(\,\boldsymbol{\Lambda}^{mn}(\boldsymbol{C}):\)

\[(\boldsymbol{A}\otimes\boldsymbol{B}^{\,T})\ \cdot\ \boldsymbol{\Lambda}^{mn}(\boldsymbol{X})\ =\ \boldsymbol{\Lambda}^{mn}(\boldsymbol{C})\,.\]

The theory of linear systems says that such a system has a unique solution if, and only if, the coefficient matrix is non-singular. Here

\[ \begin{align}\begin{aligned}\det{(\boldsymbol{A}\otimes\boldsymbol{B}^{\,T})}\ =\ (\det{\boldsymbol{A})}^n \cdot\ (\det{\boldsymbol{B}^{\,T}})^m\ =\ (\det{\boldsymbol{A})}^n \cdot\ (\det{\boldsymbol{B})}^m\,;\\\det{(\boldsymbol{A}\otimes\boldsymbol{B}^{\,T})}\neq 0 \quad\Leftrightarrow\quad \left(\ \det{\boldsymbol{A}}\neq 0\ \land\ \det{\boldsymbol{B}}\neq 0\ \right) \,.\end{aligned}\end{align} \]

Thus we have proved that the linear system (5), as well as the equivalent matrix equation (4), \(\,\) have a unique solution \(\,\) if and only if \(\,\) both matrices, \(\,\boldsymbol{A}\ \) and \(\ \boldsymbol{B},\ \) are non-singular. \(\\\) The aforesaid unique solution then reads: \(\ \boldsymbol{X}\ =\ \boldsymbol{A}^{-1}\boldsymbol{C}\,\boldsymbol{B}^{-1}\,.\) \(\quad\bullet\)

Problem 4. \(\,\)

Given the matrices \(\,\boldsymbol{A}\in M_{m\times p}(K)\,\) and \(\,\boldsymbol{B}\in M_{p\times n}(K),\ \) the product \(\,\boldsymbol{A}\boldsymbol{B}\ \) can be expressed in the vectorized form as

(6)\[\boldsymbol{\Lambda}^{mn}(\boldsymbol{A}\boldsymbol{B})\ \,=\ \, \left(\,\boldsymbol{A}\otimes\boldsymbol{I}_n\,\right)\ \cdot\ \boldsymbol{\Lambda}^{pn}(\boldsymbol{B})\ =\ \left(\,\boldsymbol{I}_m\otimes\boldsymbol{B^{\,T}}\,\right)\ \cdot\ \boldsymbol{\Lambda}^{mp}(\boldsymbol{A})\,.\]

Using the relation between vectors representing a given matrix \(\,\boldsymbol{C}\in M_{m\times n}(K)\,:\)

(7)\[\boldsymbol{\Lambda}^{nm}(\boldsymbol{C^{\,T}})\ =\ \boldsymbol{\mathrm{V}}^{mn}(\boldsymbol{C})\]

derive the relations analogous to (6) for \(\,\boldsymbol{\mathrm{V}}^{mn}(\boldsymbol{A}\boldsymbol{B})\,.\)

Solution. \(\,\)

Assume that the dimensions of the matrices are: \(\ \ \left\{\ \begin{array}{l} \boldsymbol{A}\,:\ m\times p\,,\\ \boldsymbol{B}\,:\ p\times n\,.\end{array} \right.\quad\) We start from

\[\vartriangleright\quad \boldsymbol{\Lambda}^{mn}(\boldsymbol{A}\boldsymbol{B})\ \,=\ \, \left(\,\boldsymbol{I}_m\otimes\boldsymbol{B^{\,T}}\,\right)\ \cdot\ \boldsymbol{\Lambda}^{mp}(\boldsymbol{A})\,.\]

The substitution \(\quad\left\{\ \begin{array}{ll} \boldsymbol{A}\rightarrow\boldsymbol{B}^{\,T}\ :\ m\times p\,; & \boldsymbol{B}\ :\ p\times m \\ \boldsymbol{B}\rightarrow\boldsymbol{A}^{\,T}\ :\ p\times n\,; & \boldsymbol{A}\ :\ n\times p \end{array}\right.\quad\) yields

\[ \begin{align}\begin{aligned}\boldsymbol{\Lambda}^{mn}(\boldsymbol{B}^T\boldsymbol{A}^T)\ \,=\ \, \left(\,\boldsymbol{I}_m\otimes\boldsymbol{A}\,\right)\ \cdot\ \boldsymbol{\Lambda}^{mp}(\boldsymbol{B}^T)\,,\\\boldsymbol{\Lambda}^{mn} \left[\,\left(\boldsymbol{A}\boldsymbol{B}\right)^T\,\right] \ \,=\ \, \left(\,\boldsymbol{I}_m\otimes\boldsymbol{A}\,\right)\ \cdot\ \boldsymbol{\Lambda}^{mp}(\boldsymbol{B}^T)\,.\end{aligned}\end{align} \]

Making use of relation (7) we get

\[\boldsymbol{\mathrm{V}}^{nm}(\boldsymbol{A}\boldsymbol{B})\ =\ \left(\,\boldsymbol{I}_m\otimes\boldsymbol{A}\,\right)\ \cdot\ \boldsymbol{\mathrm{V}}^{pm}(\boldsymbol{B})\,.\]

To obtain the result for \(\ \ \left\{\ \begin{array}{l} \boldsymbol{A}\,:\ m\times p\,,\\ \boldsymbol{B}\,:\ p\times n\,,\end{array} \right.\ \ \) we exchange the denotements \(\ m\leftrightarrows n\,:\)

\[\blacktriangleright\quad \boldsymbol{\mathrm{V}}^{mn}(\boldsymbol{A}\boldsymbol{B})\ =\ \left(\,\boldsymbol{I}_n\otimes\boldsymbol{A}\,\right)\ \cdot\ \boldsymbol{\mathrm{V}}^{pn}(\boldsymbol{B})\,.\]

On the other hand, starting from

\[\vartriangleright\quad \boldsymbol{\Lambda}^{mn}(\boldsymbol{A}\boldsymbol{B})\ \,=\ \, \left(\,\boldsymbol{A}\otimes\boldsymbol{I}_n\,\right)\ \cdot\ \boldsymbol{\Lambda}^{pn}(\boldsymbol{B})\]

and making the substitution \(\quad\left\{\ \begin{array}{ll} \boldsymbol{A}\rightarrow\boldsymbol{B}^{\,T}\ :\ m\times p\,; & \boldsymbol{B}\ :\ p\times m \\ \boldsymbol{B}\rightarrow\boldsymbol{A}^{\,T}\ :\ p\times n\,; & \boldsymbol{A}\ :\ n\times p \end{array}\right.\quad\) we get

\[ \begin{align}\begin{aligned}\boldsymbol{\Lambda}^{mn}(\boldsymbol{B}^T\boldsymbol{A}^T)\ \,=\ \, \left(\,\boldsymbol{B}^T\otimes\boldsymbol{I}_n\,\right)\ \cdot\ \boldsymbol{\Lambda}^{pn}(\boldsymbol{A}^T)\,,\\\boldsymbol{\Lambda}^{mn} \left[\,\left(\boldsymbol{A}\boldsymbol{B}\right)^T\,\right] \ \,=\ \, \left(\,\boldsymbol{B}^T\otimes\boldsymbol{I}_n\,\right)\ \cdot\ \boldsymbol{\Lambda}^{pn}(\boldsymbol{A}^T)\,.\end{aligned}\end{align} \]

Using once again the relation (7) we obtain

\[\boldsymbol{\mathrm{V}}^{nm}(\boldsymbol{A}\boldsymbol{B})\ =\ \left(\,\boldsymbol{B}^T\otimes\boldsymbol{I}_n\,\right)\ \cdot\ \boldsymbol{\mathrm{V}}^{np}(\boldsymbol{A})\,.\]

By exchange of the denotements \(\ m\leftrightarrows n\ \) we get the relation for \(\ \ \left\{\ \begin{array}{l} \boldsymbol{A}\,:\ m\times p\,,\\ \boldsymbol{B}\,:\ p\times n\,: \end{array}\right.\)

\[\blacktriangleright\quad \boldsymbol{\mathrm{V}}^{mn}(\boldsymbol{A}\boldsymbol{B})\ =\ \left(\,\boldsymbol{B}^T\otimes\boldsymbol{I}_m\,\right)\ \cdot\ \boldsymbol{\mathrm{V}}^{mp}(\boldsymbol{A})\,.\]

Collecting the results, we come up with the formula

\[\boldsymbol{\mathrm{V}}^{mn}(\boldsymbol{A}\boldsymbol{B})\ =\ \left(\,\boldsymbol{I}_n\otimes\boldsymbol{A}\,\right)\ \cdot\ \boldsymbol{\mathrm{V}}^{pn}(\boldsymbol{B})\ =\ \left(\,\boldsymbol{B}^T\otimes\boldsymbol{I}_m\,\right)\ \cdot\ \boldsymbol{\mathrm{V}}^{mp}(\boldsymbol{A})\]

valid for any matrices \(\,\boldsymbol{A}\in M_{m\times p}(K)\ \) and \(\,\boldsymbol{B}\in M_{p\times n}(K).\) \(\quad\bullet\)

Problem 5. \(\,\)

Consider a one-dimensional motion along the \(\,x\)-axis: \(\,x=x(t),\ t\in[\,0,T\,].\ \) Given a vector of position data from a uniform division of the interval \(\,[\,0,T\,]\ \) into \(\,N\ \) segments, derive the corresponding acceleration vector by means of the one-dimensional discrete Laplacian. Compare illustratively the exact and approximate results.

Solution. \(\,\)

The function ML(N) (‘Minus Laplacian’) returns the \(\,N\times N\ \) matrix performing the discrete two-fold differentiation of a function defined on a one-dimensional grid of \(\,N\,\) points.

As an equation of motion, we choose a fourth-order polynomial of time, \(\ x(t),\ t \in [\,0,N\,],\ \) such that \(\,x(0)=x(N)=0.\ \) The position is sampled in \(\,N+1\,\) time points \(\,0,\,1,\,\ldots,\,N,\ \) but the acceleration is evaluated only in \(\,n=N-1\ \) internal time points \(\,1,\,\ldots,\,N-1.\)

To compare the approximate vs exact results, the exact acceleration is given:

Before execution of the code below, \(\,\) activate \(\,\) the three above functions !

Output. \(\,\) On the background of the exact acceleration plot, the program displays the discrete values of acceleration calculated by the discrete two-fold differentiation. Additionally, for each internal time \(\,t\in \{1,2,\ldots,n\}\ \) the approximate (A) and exact (a) values of acceleration as well as the relative divergence thereof are listed in a table. By uncommenting a proper command, the plot of \(\ x=x(t),\ t\in [0,N],\ \) may also be shown.