Direct Sum and Tensor Product (Outer Product)
|
05-04-2023, 07:56 PM
Post: #1
|
|||
|
|||
Direct Sum and Tensor Product (Outer Product)
DIRSUM: Direct Sum
DIRSUM is the direct sum of two tensors, specifically column vectors. The direct sum, symbolized by ⊕ (circle with a plus symbol in it), stacks column vectors on top of each other. The order of the two vectors matters. Example: V1 = [ [ 2 ] [ 3 ] ] V2 = [ [ 5 ] [ 6 ] [ 8 ] ] V1 ⊕ V2 = [ [ 2 ] [ 3 ] [ 5 ] [ 6 ] [ 8 ] ] V2 ⊕ V1 = [ [ 5 ] [ 6 ] [ 8 ] [ 2 ] [ 3 ] ] The dimension of the direct sum is the sum of the dimensions of the vectors. TENSOR: Tensor Product The tensor product, also known as the outer product multiplies the numbers from V1 to each element V2 in order. The tensor product can be represented in a column vector or a matrix. If V1 and V2 are matrices, the outer product is calculated as: V1 ⊗ V2 = V1 × V2ᵀ = V1 × transpose(V2) Example: V1 = [ [ 2 ] [ 3 ] ] V2 = [ [ 5 ] [ 6 ] [ 8 ] ] V1 ⊕ V2 = [ [ 10, 12, 16 ] [ 15, 18, 24 ] ] V2 ⊕ V1 = [ [ 10, 15 ] [ 12, 18 ] [ 16, 24 ] ] The tensor product is not commutative, order matters. Code: EXPORT DIRSUM(v,w) Code: EXPORT TENSOR(v,w) Source: Bradley, Tai-Danae. "The Tensor Products, Demystified" math3ma.com November 18, 2018. https://www.math3ma.com/blog/the-tensor-...emystified Accessed April 24, 2023. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)