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:

- The dot product (also known as the "inner product"), which takes a pair of coordinate vectors as input and produces a scalar
- The Kronecker product, which takes a pair of matrices as input and produces a block matrix
- Standard matrix multiplication

## Definition

Given two vectors

their outer product, denoted **u** ⊗ **v**,^{[1]} is defined as the *m* × *n* matrix **A** obtained by multiplying each element of **u** by each element of **v**:^{[2]}

Or in index notation:

If and are vectors of the same dimension, then .

The outer product **u** ⊗ **v** is equivalent to a matrix multiplication **uv**^{T}, provided that **u** is represented as a *m* × 1 column vector and **v** as a *n* × 1 column vector (which makes **v**^{T} a row vector).^{[3]}^{[4]} For instance, if *m* = 4 and *n* = 3, then^{[5]}

For complex vectors, it is often useful to take the conjugate transpose of **v**, denoted or :

- .

### Contrast with Euclidean inner product

If *m* = *n*, then one can take the matrix product the other way, yielding a scalar (or 1 × 1 matrix):

which is the standard inner product for Euclidean vector spaces,^{[4]} better known as the dot product. The inner product is the trace of the outer product.^{[6]} Unlike the inner product, the outer product is not commutative.

Multiplication of a vector by the matrix can be written in terms of the inner product, using the relation .

### The outer product of tensors

Given two tensors **u**, **v** with dimensions and , their outer product is a tensor with dimensions and entries

For example, if **A** is of order 3 with dimensions (3, 5, 7) and **B** is of order 2 with dimensions (10, 100), then their outer product **C** is of order 5 with dimensions (3, 5, 7, 10, 100). If **A** has a component *A*_{[2, 2, 4]} = 11 and **B** has a component *B*_{[8, 88]} = 13, then the component of **C** formed by the outer product is *C*_{[2, 2, 4, 8, 88]} = 143.

### 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 and , we have:

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 and , we can write:

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

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:

The outer product of tensors satisfies the additional associativity property:

### Rank of an outer product

If **u** and **v** are both nonzero, then the outer product matrix **uv**^{T} 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 and is the element .

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 is an element of the dual space of *V*. The outer product *V* → *W* is then given by

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%`

;^{[7]} 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()`

.
^{[8]}
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.^{[9]}

### Spinors

Suppose *s, t, w, z* ∈ ℂ so that (*s, t*) and (*w, z*) are in ℂ^{2}. Then the outer product of these complex 2-vectors is an element of M(2, ℂ), the 2 × 2 complex matrices:

- The determinant of this matrix is
*swtz*−*sztw*= 0 because of the commutative property of ℂ.

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,^{[10]} but it was introduced by Wolfgang Pauli in 1927^{[11]} so that M(2, ℂ) 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 (*u*_{i}) and (*v*_{j}) is given by the logical matrix . This type of matrix is used in the study of binary relations, and is called a rectangular relation or a **cross-vector**.^{[12]}

## See also

### Products

### Duality

## References

**^**"Comprehensive List of Algebra Symbols".*Math Vault*. 2020-03-25. Retrieved 2020-09-07.**^**Lerner, R. G.; Trigg, G. L. (1991).*Encyclopaedia of Physics*(2nd ed.). VHC. ISBN 0-89573-752-3.**^**Lipschutz, S.; Lipson, M. (2009).*Linear Algebra*. Schaum’s Outlines (4th ed.). McGraw-Hill. ISBN��978-0-07-154352-1.- ^
^{a}^{b}Keller, Frank (February 23, 2020). "Algebraic Properties of Matrices; Transpose; Inner and Outer Product" (PDF).*inf.ed.ac.uk*. Retrieved September 6, 2020. **^**James M. Ortega (1987)*Matrix Theory: A Second Course*, page 7, Plenum Press ISBN 0-306-42433-9**^**Stengel, Robert F. (1994).*Optimal Control and Estimation*. New York: Dover Publications. p. 26. ISBN 0-486-68200-5.**^**"outer function | R Documentation".*www.rdocumentation.org*. Retrieved 2020-09-07.**^**"numpy.outer — NumPy v1.19 Manual".*numpy.org*. Retrieved 2020-09-07.**^**Steeb, Willi-Hans; Hardy, Yorick (2011). "Applications (Chapter 3)".*Matrix Calculus and Kronecker Product: A Practical Approach to Linear and Multilinear Algebra*(2 ed.). World Scientific. ISBN 981-4335-31-2.**^**Élie Cartan (1937)*Lecons sur la theorie des spineurs*, translated 1966:*The Theory of Spinors*, Hermann, Paris**^**Pertti Lounesto (1997)*Clifford Algebras and Spinors*, page 51, Cambridge University Press ISBN 0-521-59916-4**^**Ki Hang Kim (1982)*Boolean Matrix Theory and Applications*, page 37, Marcel Dekker ISBN 0-8247-1788-0

## Further reading

- Carlen, Eric; Canceicao Carvalho, Maria (2006). "Outer Products and Orthogonal Projections".
*Linear Algebra: From the Beginning*. Macmillan. pp. 217–218.