0
$\begingroup$

I was self-learning about linear algebra, vectors, matrices, and tensors out of curiosity. When I came upon tensor operations, it was somewhat difficult to digest. I saw its Wikipedia pages and was overwhelmed by the sheer amount of cross references to other pages and similar topics. After going through a bit, here is what I understood. I wanted to know what I learnt was correct.

Sum:
It is an operation that takes in two tensors $T^p_q$ and $U^p_q$, both with dimensions $(a_1, a_2, ..., a_p, b_1, b_2, ..., b_q)$ and results in a tensor $V^p_q$ with dimensions $(a_1, a_2, ..., a_p, b_1, b_2, ..., b_q)$.
It is defined as $v^{i_1...i_p}_{j_1...j_q}=t^{i_1...i_p}_{j_1...j_q}+u^{i_1...i_p}_{j_1...j_q}$.

Scalar product:
It is an operation that takes in one tensor $T^p_q$, with dimensions $(a_1, a_2, ..., a_p, b_1, b_2, ..., b_q)$ and one scalar ${\lambda}$ and results in a tensor $V^p_q$ with dimensions $(a_1, a_2, ..., a_p, b_1, b_2, ..., b_q)$.
It is defined as $v^{i_1...i_p}_{j_1...j_q}={\lambda}{\cdot}t^{i_1...i_p}_{j_1...j_q}$.

Tensor product:
It is an operation that takes in two tensors $T^p_q$ and $U^r_s$, with dimensions $(a_1, a_2, ..., a_p, b_1, b_2, ..., b_q)$ and $(c_1, c_2, ..., c_r, d_1, d_2, ..., d_s)$ respectively and results in a tensor $V^{p+r}_{q+s}$ with dimensions $(a_1, a_2, ..., a_p, c_1, c_2, ..., c_r, b_1, b_2, ..., b_q, d_1, d_2, ..., d_s)$.
It is defined as $v^{i_1...i_pk_1...k_r}_{j_1...j_ql_1...l_s}=t^{i_1...i_p}_{j_1...j_q}{\cdot}u^{k_1...k_r}_{l_1...l_s}$.

Kronecker product:
It is an operation that takes in two tensors $T^p_q$ and $U^p_q$, with dimensions $(a_1, a_2, ..., a_p, b_1, b_2, ..., b_q)$ and $(c_1, c_2, ..., c_p, d_1, d_2, ..., d_q)$ respectively and results in a tensor $V^p_q$ with dimensions $(a_1c_1, a_2c_2, ..., a_pc_p, b_1d_1, b_2d_2, ...,b_qd_q)$.
It is defined as $v^{i_1...i_p}_{j_1...j_q}=t^{w_1...w_p}_{x_1...x_q}{\cdot}u^{y_1...y_p}_{z_1...z_q}$ where $w_n=i_n//a_n$ , $x_n=j_n//b_n$ , $y_n=i_n\%a_n$ , $z_n=j_n\%b_n$.

Contraction:
It is an operation that takes in one tensor $T^p_q$, with dimensions $(a_1, a_2, ..., a_x, ..., a_p, b_1, b_2, ..., b_y, ..., b_q)$ and two ranks $x\in1..p$ and $y\in1..q$ and results in a tensor $V^{p-1}_{q-1}$ with dimensions $(a_1, a_2, ..., a_{x-1}, a_{x+1}, ..., a_p, b_1, b_2, ..., b_{y-1}, b_{y+1}, ..., b_q)$.
It is defined as $v^{i_1...i_{p-1}}_{j_1...j_{q-1}}=t^{i_1...z...i_p \hspace{1mm};\hspace{1mm} z=i_x}_{j_1...z...j_q \hspace{1mm};\hspace{1mm} z=j_y}$.

Inner product:
It is just a vector product followed by contraction.

$\endgroup$
3
  • $\begingroup$ Notation for physicists? $\endgroup$
    – Wuestenfux
    Mar 15, 2022 at 17:30
  • 1
    $\begingroup$ @Wuestenfux It was called Einstein notation in the lecture I watched (on YouTube). $\endgroup$ Mar 15, 2022 at 17:50
  • $\begingroup$ Note that in the definition I wrote for Kronecker product, it assumes a zero-based indexing of dimensions. Aka, $w_n$ and $y_n$ ranges from $0...{a_n-1}$, $x_n$ and $z_n$ ranges from $0...{b_n-1}$. Similar is the case with $i_n$ and $j_n$. $\endgroup$ Mar 15, 2022 at 20:46

1 Answer 1

1
$\begingroup$

Your assessments are mostly correct, but here are a few nitpicks/clarifications that you might consider helpful. I will use the term "rank" to describe the number of dimension in the array that characterizes the tensor; for instance, vectors are rank 1 tensors and any matrices are rank 2 tensors. A tensor $T^p_q$ (per your notation) has rank $p+q$.

  • The term "scalar product" is sometimes used as a synonym for "inner product"
  • I have only seen the term Kronecker product used as an operation between two tensors with rank 1 or two tensors with rank 2, but perhaps it is in common use.
  • Many operations (in addition to the inner product) can be thought of as a contraction. For example, the usual "product" of two matrices is a tensor product of two $(1,1)$ tensors followed by a contraction. The trace of a matrix is simply a contraction of a $(1,1)$ tensor.
  • Another operation that you ought to be aware of in this context is vectorization, which has an important relationship with the Kronecker product.
$\endgroup$
4
  • $\begingroup$ Thanks for the insights about matrix multiplication. I will go through vectorization. Are there any other related and relevant operations? $\endgroup$ Mar 15, 2022 at 20:39
  • $\begingroup$ About kronecker product, yes I too had only seen it with rank 1 and rank 2 tensor. But it seemed generalizable and also there is no other product which preserves rank. I had to put an hour of effort to come up with the generalized definition that I mentioned in the question. :) $\endgroup$ Mar 15, 2022 at 20:42
  • $\begingroup$ I don’t know of any other common operations. The generalized definition is interesting! $\endgroup$ Mar 16, 2022 at 1:59
  • $\begingroup$ I also think the 'scalar product' mentioned is also redundant, since it can be thought of a tensor product with first tensor being 0-rank. $\endgroup$ Mar 16, 2022 at 9:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .