 Outer Product
Get Outer Product essential facts below. View Videos or join the Outer Product discussion. Add Outer Product to your PopFlock.com topic list for future reference or share this resource on social media.
Outer Product

In linear algebra, the outer product of two coordinate vectors is a matrix. If the two vectors have dimensions n and m, then their outer product is an n × m matrix. More generally, given two tensors (multidimensional arrays of numbers), their outer product is a tensor. The outer product of tensors is also referred to as their tensor product, and can be used to define the tensor algebra.

The outer product contrasts with

## Definition

Given two vectors

{\begin{aligned}\mathbf {u} &=\left(u_{1},u_{2},\dots ,u_{m}\right)\\\mathbf {v} &=\left(v_{1},v_{2},\dots ,v_{n}\right)\end{aligned}} their outer product, denoted , is defined as the matrix A obtained by multiplying each element of u by each element of v:

$\mathbf {u} \otimes \mathbf {v} =\mathbf {A} ={\begin{bmatrix}u_{1}v_{1}&u_{1}v_{2}&\dots &u_{1}v_{n}\\u_{2}v_{1}&u_{2}v_{2}&\dots &u_{2}v_{n}\\\vdots &\vdots &\ddots &\vdots \\u_{m}v_{1}&u_{m}v_{2}&\dots &u_{m}v_{n}\end{bmatrix}}$ Or in index notation:

$(\mathbf {u} \otimes \mathbf {v} )_{ij}=u_{i}v_{j}$ The outer product is equivalent to a matrix multiplication uvT, provided that u is represented as a column vector and v as a column vector (which makes vT a row vector). For instance, if and , then

$\mathbf {u} \otimes \mathbf {v} =\mathbf {u} \mathbf {v} ^{\textsf {T}}={\begin{bmatrix}u_{1}\\u_{2}\\u_{3}\\u_{4}\end{bmatrix}}{\begin{bmatrix}v_{1}&v_{2}&v_{3}\end{bmatrix}}={\begin{bmatrix}u_{1}v_{1}&u_{1}v_{2}&u_{1}v_{3}\\u_{2}v_{1}&u_{2}v_{2}&u_{2}v_{3}\\u_{3}v_{1}&u_{3}v_{2}&u_{3}v_{3}\\u_{4}v_{1}&u_{4}v_{2}&u_{4}v_{3}\end{bmatrix}}.$ For complex vectors, it is often useful to take the conjugate transpose of v, denoted $\mathbf {v} ^{\dagger }$ or $\left(\mathbf {v} ^{\textsf {T}}\right)^{*}$ :

$\mathbf {u} \otimes \mathbf {v} =\mathbf {u} \mathbf {v} ^{\dagger }=\mathbf {u} \left(\mathbf {v} ^{\textsf {T}}\right)^{*}$ .

### Contrast with Euclidean inner product

If , then one can take the matrix product the other way, yielding a scalar (or matrix):

$\left\langle \mathbf {u} ,\mathbf {v} \right\rangle =\mathbf {u} ^{\textsf {T}}\mathbf {v}$ which is the standard inner product for Euclidean vector spaces, better known as the dot product. The inner product is the trace of the outer product. Unlike the inner product, the outer product is not commutative.

### The outer product of tensors

Given two tensors u, v with dimensions $(k_{1},k_{2},\dots ,k_{m})$ and $(l_{1},l_{2},\dots ,l_{n})$ , their outer product $\mathbf {u} \otimes \mathbf {v}$ is a tensor with dimensions $(k_{1},k_{2},\dots ,k_{m},l_{1},l_{2},\dots ,l_{n})$ and entries

$(\mathbf {u} \otimes \mathbf {v} )_{i_{1},i_{2},\dots i_{m},j_{1},j_{2},\dots ,j_{n}}=u_{i_{1},i_{2},\dots ,i_{m}}v_{j_{1},j_{2},\dots ,j_{n}}$ For example, if A is of order 3 with dimensions and B is of order 2 with dimensions , then their outer product C is of order 5 with dimensions . If A has a component and B has a component , then the component of C formed by the outer product is .

### Connection with the Kronecker product

The outer product and Kronecker product are closely related; in fact the same symbol is commonly used to denote both operations.

If $\mathbf {u} ={\begin{bmatrix}1&2&3\end{bmatrix}}^{\textsf {T}}$ and $\mathbf {v} ={\begin{bmatrix}4&5\end{bmatrix}}^{\textsf {T}}$ , we have:

{\begin{aligned}\mathbf {u} \otimes _{\text{Kron}}\mathbf {v} &={\begin{bmatrix}4\\5\\8\\10\\12\\15\end{bmatrix}},&\mathbf {u} \otimes _{\text{outer}}\mathbf {v} &={\begin{bmatrix}4&5\\8&10\\12&15\end{bmatrix}}\end{aligned}} In the case of column vectors, the Kronecker product can be viewed as a form of vectorization (or flattening) of the outer product. In particular, for two column vectors $\mathbf {u}$ and $\mathbf {v}$ , we can write:

$\mathbf {u} \otimes _{\text{Kron}}\mathbf {v} =\operatorname {vec} (\mathbf {v} \otimes _{\text{outer}}\mathbf {u} )$ Note that the order of the vectors is reversed in the right side of the equation.

Another similar identity that further highlights the similarity between the operations is

$\mathbf {u} \otimes _{\text{Kron}}\mathbf {v} ^{\textsf {T}}=\mathbf {u} \mathbf {v} ^{\textsf {T}}=\mathbf {u} \otimes _{\mathrm {outer} }\mathbf {v}$ where the order of vectors needs not be flipped. The middle expression uses matrix multiplication, where the vectors are considered as column/row matrices.

## Properties

The outer product of vectors satisfies the following properties:

{\begin{aligned}(\mathbf {u} \otimes \mathbf {v} )^{\textsf {T}}&=(\mathbf {v} \otimes \mathbf {u} )\\(\mathbf {v} +\mathbf {w} )\otimes \mathbf {u} &=\mathbf {v} \otimes \mathbf {u} +\mathbf {w} \otimes \mathbf {u} \\\mathbf {u} \otimes (\mathbf {v} +\mathbf {w} )&=\mathbf {u} \otimes \mathbf {v} +\mathbf {u} \otimes \mathbf {w} \\c(\mathbf {v} \otimes \mathbf {u} )&=(c\mathbf {v} )\otimes \mathbf {u} =\mathbf {v} \otimes (c\mathbf {u} )\end{aligned}} The outer product of tensors satisfies the additional associativity property:

$(\mathbf {u} \otimes \mathbf {v} )\otimes \mathbf {w} =\mathbf {u} \otimes (\mathbf {v} \otimes \mathbf {w} )$ ### Rank of an outer product

If u and v are both nonzero, then the outer product matrix uvT always has matrix rank 1. Indeed, the columns of the outer product are all proportional to the first column. Thus they are all linearly dependent on that one column, hence the matrix is of rank one.

("Matrix rank" should not be confused with "tensor order", or "tensor degree", which is sometimes referred to as "rank".)

## Definition (abstract)

Let V and W be two vector spaces. The outer product of $v\in V$ and $w\in W$ is the element $v\otimes w\in V\otimes W$ .

If V is an inner product space, then it is possible to define the outer product as a linear map V -> W. In which case, the linear map $x\mapsto \langle v,x\rangle$ is an element of the dual space of V. The outer product V -> W is then given by

$(v\otimes w)(x)=\langle v,x\rangle w$ This shows why a conjugate transpose of v is commonly taken in the complex case.

## In programming languages

In some programming languages, given a two-argument function f (or a binary operator), the outer product of f and two one-dimensional arrays A and B is a two-dimensional array C such that C[i, j] = f(A[i], B[j]). This is syntactically represented in various ways: in APL, as the infix binary operator ?.f; in J, as the postfix adverb f/; in R, as the function outer(A, B, f) or the special %o%; in Mathematica, as Outer[f, A, B]. In MATLAB, the function kron(A, B) is used for this product. These often generalize to multi-dimensional arguments, and more than two arguments.

In the Python library NumPy, the outer product can be computed with function np.outer.  In contrast, np.kron results in a flat array. The outer product of multidimensional arrays can be computed using np.multiply.outer.

## Applications

As the outer product is closely related to the Kronecker product, some of the applications of the Kronecker product use outer products. These applications are found in quantum theory, signal processing, and image compression.

### Spinors

Suppose s, t, w, z ? C so that (s, t) and (w, z) are in C2. Then the outer product of these complex 2-vectors is an element of M(2, C), the 2 × 2 complex matrices:

${\begin{pmatrix}sw&tw\\sz&tz\end{pmatrix}}.$ The determinant of this matrix is swtz - sztw = 0 because of the commutative property of C.

In the theory of spinors in three dimensions, these matrices are associated with isotropic vectors due to this null property. Élie Cartan described this construction in 1937, but it was introduced by Wolfgang Pauli in 1927 so that M(2, C) has come to be called Pauli algebra.

### Concepts

The block form of outer products is useful in classification. Concept analysis is a study that depends on certain outer products:

When a vector has only zeros and ones as entries, it is called a logical vector, a special case of a logical matrix. The logical operation and takes the place of multiplication. The outer product of two logical vectors (ui) and (vj) is given by the logical matrix $\left(a_{ij}\right)=\left(u_{i}\land v_{j}\right)$ . This type of matrix is used in the study of binary relations, and is called a rectangular relation or a cross-vector.