How does one calculate the Tensor product of two matricies?

In summary: Similarly you compute the second row, etc. Note that the matrix of A\otimes B depends on the bases you choose for A and B; if you change the ordening of the bases, you will get a different matrix.
  • #1
daveyp225
88
0
Just as a concrete example, say A and A' are two 2x2 matricies from R^2 to R^2,

[tex]A = \left [ \begin{array}{cc} a \,\, b \\ c \,\, d \end{array} \right ] [/tex]

[tex]A' = \left [ \begin{array}{cc} x \,\, y \\ z \,\, w \end{array} \right ] [/tex]

What would [tex]A \otimes_\mathbb{R} A'[/tex] look like (say wrt the standard basis of [tex]\mathbb{R}^2 \otimes_\mathbb{R} \mathbb{R}^2[/tex]?).

Any help in understanding this would be greatly appreciated.
 
Physics news on Phys.org
  • #2
So, I know

[tex](A \otimes A')(v \otimes v') = A(v) \otimes A(v')[/tex]

So we get something like

[tex]\left [ \begin{array}. a v_1 + bv_2 \\ cv_1 + dv_2 \end{array} \right ] \otimes \left [ \begin{array}. xv_1' + yv_2' \\ zv_1' + wv_2' \end{array} \right ] [/tex]

But what does this mean exactly, and how can I get a general matrix from the tensor of A and A'?
 
  • #3
It would be the "2 by 2 by 2 by 2" matrix which would, strictlyh speaking, require four dimensions to show.

You can think of it as 2 2 by 2 matrices, one behind the other (3 dimensions) with the same thing (again constructed of 3 dimensions) "behind" that in the fourth dimension.

Of course, 2x2x2x2= 16 so this will have 16 entries. They will be the products of each of the four entries in the first matrix with each of the four entries in the second matrix.

That is, in position "1" in the fourth dimension, you would have 2 2 by 2 matrices, one on top of the other:
[tex]\begin{bmatrix}ax & ay \\ az & aw\end{bmatrix}[/itex]
and

[tex]\begin{bmatrix}bx & by \\ bz & bw\end{bmatrix}[/tex]

And at the next place in the fourth dimension, we have
[tex]\begin{bmatrix}cx & cy \\ cz & cw\end{bmatrix}[/tex]
and

[tex]\begin{bmatrix}dx & dy \\ dz & dw\end{bmatrix}[/tex]
 
  • #4
Okay, thanks very much for the reply. Let's say we wish to tensor the identity,

[tex]A \otimes I[/tex]

To show that it is indeed this 4x4 matrix given by

[tex]\left [ \begin{array}. a \,\, 0 \,\, b \,\, 0 \\
0 \,\, a \,\, 0 \,\, b \\
c \,\, 0 \,\, d \,\, 0 \\
0 \,\, c \,\, 0 \,\, d \end{array} \right ][/tex]

I'll need to know what [tex]I \otimes e_{ij}[/tex] is since the tensor reduces to (i think):

[tex]a(I \otimes e_{11}) +b(I \otimes e_{12}) +c(I \otimes e_{21}) +d(I \otimes e_{22}) [/tex]

Or maybe just to know how to know exactly what [tex]e_{ij} \otimes e_{kl}[/tex] is and how to arrive at it. I know what it is now, thanks to you, but "taking the tensor" just seems not concrete at all. How do you get these 4x4 matricies?

I'm not sure how to arrive at what this is, intuitively or otherwise.
 
  • #5
[tex]I\otimes e_{11}[/tex] makes no sense: I is a linear map, e_{11] is a vector. You need to compute the value of A\otimes I at the basis vectors {e_ij}ij. By definition this is

[tex](A\otimes I)(e_{ij}\otimes e_{kl})=Ae_{ij}\otimes Ie_{kl},[/tex]

see also Kronecker product.
 
  • #6
By [tex]e_{ij}[/tex] I meant the 2x2 matrix with entry 1 in row i and column j. How could it be a vector in R^2 with two indeces? With that, I believe what I wrote makes sense and is correct by the bilinearity of [tex]\otimes[/tex]

The problem I am having is I don't know why or how to calculate the tensor of two 2x2 matricies is a 4x4 matrix. I'm not interested on getting the answer to the evaluation. I am interested in forming the general matrix which results from the tensor of two of them. Thanks to HallsOfIvy I know what it is. But how does one arrive at this?
 
  • #7
I am sorry, I thought e_{ij} were basis elements. Here is a detailed explanation.

Let [tex]k[/tex] be a field, let [tex]V_1,V_2,W_1,W_2[/tex] be finite-dimensional [tex]k[/tex]-vector spaces, and let [tex]f:V_1\to W_1 , g:V_2\to W_2[/tex] be [tex]k[/tex]-linear maps.

Recall that [tex]f\otimes g:V_1\otimes V_2\to W_1\otimes W_2[/tex] is (well-)defined on pure tensors by [tex](f\otimes g_2)(v\otimes w)=f(v)\otimes g(w)[/tex]. Pick bases [tex](v_1,...,v_n)[/tex] resp. [tex](w_1,...,w_m)[/tex] resp. [tex](v'_1,...,v'_{n'})[/tex] resp. [tex](w'_1,...,w'_{m'})[/tex] for [tex]V_1[/tex] resp. [tex]W_1[/tex] resp. [tex]V_1[/tex] resp. [tex]W_1[/tex]. Write
[tex]fv_i=\sum_{k=1}^{n'} f_i^k v'_k,[/tex]
[tex]gw_j=\sum_{p=1}^{m'} g_j^p w'_p[/tex]
for the matrices of [tex]f[/tex] and [tex]g[/tex] with respect to these bases. Recall that [tex]\{v_i\otimes w_j\}_{i,j}[/tex] is a basis of [tex]V_1\otimes_k W_1[/tex] and that
[tex]\{v'_i\otimes w'_j\}_{i,j}[/tex] is a basis of [tex]V_2\otimes_k W_2[/tex]. We then have
[tex](f\otimes g)(v_i\otimes w_j)=f(v_i)\otimes g(w_j)=\left(\sum_{k=1}^{n'} f_i^k v'_k\right)\otimes \left(\sum_{p=1}^{m'} g_j^p w'_p\right)=\sum_{k,p}f_i^kg_j^p(v'_k\otimes w'_p).[/tex]

This matrix of [tex]f\otimes g[/tex] is the 'Kronecker product' of the matrices of [tex]f[/tex] and [tex]g[/tex].
 
  • #8
To obtain HallsOfIvy's answer, let's work this out for your 2x2-matrices A and B=A'. Of course we have to pick an ordening to write the matrix down, so let's say [tex](e_1,e_2)[/tex] is the ordened basis of R^2, and [tex](e_1\otimes e_1,e_1\otimes e_2,e_2\otimes e_1,e_2\otimes e_2)[/tex] is the ordened basis of [tex]\mathbb{R}^2\otimes \mathbb{R}^2[/tex] (i.e. we pick the lexicographic ordening).

Then the first row of the matrix A\otimes B is determined by its value on e_1\otimes e_1:

[tex](A\otimes B)(e_1\otimes e_1)=A_1^1B_1^1(e_1\otimes e_1)+A_1^1B_1^2(e_1\otimes e_2)+A_1^2B_1^1(e_2\otimes e_1)+A_1^2B_1^2(e_2\otimes e_2)[/tex]

Hence the first row becomes

[tex]\begin{bmatrix}A_1^1B_1^1 \\ A_1^1B_1^2 \\ A_1^2B_1^1 \\ A_1^2B_1^2\end
{bmatrix}[/tex]

which in your terms is

[tex]\begin{bmatrix}ax\\ az \\ cx \\ cz\end{bmatrix}[/tex]

in agreement with HallsOfIvy's algorithm.
 

1. What is a Tensor product?

A Tensor product is a mathematical operation that combines two matrices to create a new matrix. It is denoted by the symbol ⊗ and is used in linear algebra and other branches of mathematics.

2. How do you calculate the Tensor product of two matrices?

To calculate the Tensor product of two matrices, you need to first identify the dimensions of the two matrices. Then, you need to create a new matrix with the dimensions equal to the product of the dimensions of the two matrices. Finally, you multiply each element of the first matrix with each element of the second matrix to obtain the corresponding element of the new matrix.

3. What is the difference between Tensor product and matrix multiplication?

The Tensor product is a generalization of matrix multiplication and is used to combine two matrices of any size. In matrix multiplication, the dimensions of the matrices must be compatible (the number of columns of the first matrix must be equal to the number of rows of the second matrix).

4. How does the Tensor product relate to other mathematical concepts?

The Tensor product is closely related to other mathematical concepts such as vector spaces, linear transformations, and outer products. It is also used in various areas of physics, such as quantum mechanics and general relativity.

5. What are some applications of the Tensor product in real life?

The Tensor product has various applications in fields such as image processing, signal processing, and data compression. It is also used in machine learning algorithms, such as convolutional neural networks, to process data efficiently. Additionally, the Tensor product is used in cryptography and coding theory to encode and decode information.

Resources for: How does one calculate the Tensor product of two matricies?

Similar threads:

  • Linear and Abstract Algebra
Replies
19
Views
2K
  • Linear and Abstract Algebra
Replies
3
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
864
  • Linear and Abstract Algebra
Replies
6
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
964
  • Linear and Abstract Algebra
Replies
9
Views
881
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
749
  • Linear and Abstract Algebra
Replies
11
Views
975
Back
Top