TheInfoList

In
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrix (mat ...
, the outer product of two
coordinate vector In linear algebra, a coordinate vector is a representation of a vector as an ordered list of numbers that describes the vector in terms of a particular ordered basis. Coordinates are always specified relative to an ordered basis. Bases and their a ...
s is a
matrix Matrix or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols, or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the material in between a eukaryoti ...
. If the two vectors have dimensions ''n'' and ''m'', then their outer product is an ''n'' × ''m'' matrix. More generally, given two
tensors In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...
(multidimensional arrays of numbers), their outer product is a tensor. The outer product of tensors is also referred to as their
tensor product In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...

, and can be used to define the
tensor algebra In mathematics, the tensor algebra of a vector space ''V'', denoted ''T''(''V'') or ''T''(''V''), is the algebra over a field, algebra of tensors on ''V'' (of any rank) with multiplication being the tensor product. It is the free algebra on ''V'', ...
. The outer product contrasts with: * The
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' is often also used more generally to mean a symmetric bilinear form, for example for a pseudo-Euclidean space. is an algebraic operation that takes two equal-length seque ...
(also known as the "inner product"), which takes a pair of coordinate vectors as input and produces a
scalar Scalar may refer to: *Scalar (mathematics), an element of a field, which is used to define a vector space, usually the field of real numbers *Scalar (physics), a physical quantity that can be described by a single element of a number field such as ...
* The
Kronecker product In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...
, which takes a pair of matrices as input and produces a block matrix *

# Definition

Given two vectors of size $m \times 1$ and $n \times 1$ respectively :$\mathbf = \begin u_1 \\ u_2 \\ \vdots \\ u_m \end, \quad \mathbf = \begin v_1 \\ v_2 \\ \vdots \\ v_n \end$ their outer product, denoted $\mathbf \otimes \mathbf,$ is defined as the $m \times n$ matrix $\mathbf$ obtained by multiplying each element of $\mathbf$ by each element of $\mathbf:$ :$\mathbf \otimes \mathbf = \mathbf = \begin u_1v_1 & u_1v_2 & \dots & u_1v_n \\ u_2v_1 & u_2v_2 & \dots & u_2v_n \\ \vdots & \vdots & \ddots & \vdots \\ u_mv_1 & u_mv_2 & \dots & u_mv_n \end$ Or in index notation: :$\left(\mathbf \otimes \mathbf\right)_ = u_i v_j$ Denoting the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' is often also used more generally to mean a symmetric bilinear form, for example for a pseudo-Euclidean space. is an algebraic operation that takes two equal-length seque ...
by $\,\cdot,\,$ if given an $n \times 1$ vector $\mathbf,$ then $\left(\mathbf \otimes \mathbf\right) \mathbf = \left(\mathbf \cdot \mathbf\right) \mathbf.$ If given a $1 \times m$ vector $\mathbf,$ then $\mathbf \left(\mathbf \otimes \mathbf\right) = \left(\mathbf \cdot \mathbf\right) \mathbf^.$ If $\mathbf$ and $\mathbf$ are vectors of the same dimension, then $\det \left(\mathbf \otimes\mathbf\right) = 0$. The outer product $\mathbf \otimes \mathbf$ is equivalent to a
matrix multiplication In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...

$\mathbf \mathbf^,$ provided that $\mathbf$ is represented as a $m \times 1$
column vector In linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and ...
and $\mathbf$ as a $n \times 1$ column vector (which makes $\mathbf^$ a row vector). For instance, if $m = 4$ and $n = 3,$ then :$\mathbf \otimes \mathbf = \mathbf\mathbf^\textsf = \beginu_1 \\ u_2 \\ u_3 \\ u_4\end \beginv_1 & v_2 & v_3\end = \begin 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.$ For
complex The UCL Faculty of Mathematical and Physical Sciences is one of the 11 constituent faculties of University College London , mottoeng = Let all come who by merit deserve the most reward , established = , type = Public university, Public rese ...
vectors, it is often useful to take the
conjugate transpose In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
of $\mathbf,$ denoted $\mathbf^\dagger$ or $\left\left(\mathbf^\textsf\right\right)^*$: :$\mathbf \otimes \mathbf = \mathbf \mathbf^\dagger = \mathbf \left\left(\mathbf^\textsf\right\right)^*$.

## Contrast with Euclidean inner product

If $m = n,$ then one can take the matrix product the other way, yielding a scalar (or $1 \times 1$ matrix): :$\left\langle\mathbf, \mathbf\right\rangle = \mathbf^\textsf \mathbf$ which is the standard
inner product In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
for
Euclidean vector space Euclidean space is the fundamental space of classical geometry. Originally, it was the three-dimensional space Three-dimensional space (also: 3-space or, rarely, tri-dimensional space) is a geometric setting in which three values (called ...
s, better known as the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' is often also used more generally to mean a symmetric bilinear form, for example for a pseudo-Euclidean space. is an algebraic operation that takes two equal-length seque ...
. The inner product is the
trace Trace may refer to: Arts and entertainment Music * ''Trace'' (Son Volt album), 1995 * Trace (Died Pretty album), ''Trace'' (Died Pretty album), 1993 * Trace (band), a Dutch progressive rock band * The Trace (album), ''The Trace'' (album) Other ...
of the outer product. Unlike the
inner product In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
, the outer product is not commutative. Multiplication of a vector $\mathbf$ by the matrix $\mathbf \otimes \mathbf$ can be written in terms of the inner product, using the relation $\left\left(\mathbf \otimes \mathbf\right\right)\mathbf = \mathbf\left\langle\mathbf, \mathbf\right\rangle$.

## The outer product of tensors

Given two tensors $\mathbf, \mathbf$ with dimensions $\left(k_1, k_2, \dots, k_m\right)$ and $\left(l_1, l_2, \dots, l_n\right)$, their outer product $\mathbf \otimes \mathbf$ is a tensor with dimensions $\left(k_1, k_2, \dots, k_m, l_1, l_2, \dots, l_n\right)$ and entries :$\left(\mathbf \otimes \mathbf\right)_ = u_ v_$ For example, if $\mathbf$ is of order 3 with dimensions $\left(3, 5, 7\right)$ and $\mathbf$ is of order 2 with dimensions $\left(10, 100\right),$ then their outer product $\mathbf$ is of order 5 with dimensions $\left(3, 5, 7, 10, 100\right).$ If $\mathbf$ has a component and $\mathbf$ has a component , then the component of $\mathbf$ 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 = \begin1 & 2 & 3\end^\textsf$ and $\mathbf = \begin4 & 5\end^\textsf$, we have: :$\begin \mathbf \otimes_\text \mathbf &= \begin 4 \\ 5 \\ 8 \\ 10 \\ 12 \\ 15\end, & \mathbf \otimes_\text \mathbf &= \begin 4 & 5 \\ 8 & 10 \\ 12 & 15\end \end$ 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$ and $\mathbf$, we can write: :$\mathbf \otimes_ \mathbf = \operatorname\left(\mathbf \otimes_\text \mathbf\right)$ 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 \otimes_ \mathbf^\textsf = \mathbf u \mathbf^\textsf = \mathbf \otimes_ \mathbf$ 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 \left(\mathbf \otimes \mathbf\right)^\textsf &= \left(\mathbf \otimes \mathbf\right) \\ \left(\mathbf + \mathbf\right) \otimes \mathbf &= \mathbf \otimes \mathbf + \mathbf \otimes \mathbf \\ \mathbf \otimes \left(\mathbf + \mathbf\right) &= \mathbf \otimes \mathbf + \mathbf \otimes \mathbf \\ c \left(\mathbf \otimes \mathbf\right) &= \left(c\mathbf\right) \otimes \mathbf = \mathbf \otimes \left(c\mathbf\right) \end$ The outer product of tensors satisfies the additional
associativity In mathematics, the associative property is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a Validity (logic), valid rule ...
property: :$\left(\mathbf \otimes \mathbf\right) \otimes \mathbf = \mathbf \otimes \left(\mathbf \otimes \mathbf\right)$

## Rank of an outer product

If u and v are both nonzero, then the outer product matrix uvT always has
matrix rank In linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and ...
1. Indeed, the columns of the outer product are all proportional to the first column. Thus they are all
linearly dependent In the theory of vector space In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are con ...
on that one column, hence the matrix is of rank one. ("Matrix rank" should not be confused with "
tensor order In mathematics Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
", or "tensor degree", which is sometimes referred to as "rank".)

# Definition (abstract)

Let ''V'' and ''W'' be two
vector space In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities a ...
s. The outer product of $\mathbf v \in V$ and $\mathbf w \in W$ is the element $\mathbf v \otimes \mathbf w \in V \otimes W$. If ''V'' is an
inner product space In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
, then it is possible to define the outer product as a linear map ''V'' → ''W''. In which case, the linear map $\mathbf x \mapsto \langle \mathbf v, \mathbf x\rangle$ is an element of the
dual space In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers ( and ), formulas and related structures (), shapes and spaces in which they are contained (), and quantities and their changes ( and ). There is no gen ...
of ''V''. The outer product ''V'' → ''W'' is then given by :$\left(\mathbf v \otimes \mathbf w\right) \left(\mathbf x\right) = \left\langle \mathbf v, \mathbf x \right\rangle \mathbf 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, j The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline (t ...= f(A B . 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 Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow machine learning Machine learning (ML) is the study of computer algorithms that can improve automatically through experi ...
, as Outer , A, B/syntaxhighlight>. 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 Python may refer to: * Pythonidae The Pythonidae, commonly known as pythons, are a family of nonvenomous snakes found in Africa, Asia, and Australia. Among its members are some of the largest snakes in the world. Ten genera and 42 species ...
library
NumPy NumPy (pronounced () or sometimes ()) is a library A library is a collection of materials, books or media that are easily accessible for use and not just for display purposes. It is responsible for housing updated information in order to ...
, 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 In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and th ...
, some of the applications of the Kronecker product use outer products. These applications are found in quantum theory,
signal processing Signal processing is an electrical engineering Electrical engineering is an engineering discipline concerned with the study, design, and application of equipment, devices, and systems which use electricity, electronics, and electromagnetis ...

, and
image compression Image compression is a type of data compression In signal processing Signal processing is an electrical engineering Electrical engineering is an engineering discipline concerned with the study, design, and application of equipment, ...
.

## 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 sw & tw \\ sz & tz \end.$ The
determinant In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and t ...

of this matrix is because of the
commutative property In mathematics Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
of C. In the theory of spinors in three dimensions, these matrices are associated with isotropic vectors due to this null property.
Élie Cartan Élie Joseph Cartan, ForMemRS Fellowship of the Royal Society (FRS, ForMemRS and HonFRS) is an award granted by the judges of the Royal Society The Royal Society, formally The Royal Society of London for Improving Natural Knowledge, is a ...
described this construction in 1937, but it was introduced by
Wolfgang Pauli Wolfgang Ernst Pauli (; ; 25 April 1900 – 15 December 1958) was an Austrian theoretical physicist Theoretical physics is a branch of physics Physics is the that studies , its , its and behavior through , and the related entities ...

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 (logic), and takes the place of multiplication. The outer product of two logical vectors (''u''i) and (''v''j) is given by the logical matrix $\left\left(a_\right\right) = \left\left(u_i \land v_j\right\right)$. This type of matrix is used in the study of binary relations, and is called a rectangular relation or a cross-vector.Ki Hang Kim (1982) ''Boolean Matrix Theory and Applications'', page 37, Marcel Dekker

# See also

* Dyadics * Householder transformation * Norm (mathematics) * Scatter matrix * Ricci calculus

## Products

* Cartesian product * Cross product * Exterior product * Hadamard product (matrices), Hadamard product

## Duality

* Complex conjugate * Conjugate transpose * Transpose * Bra–ket notation#Outer products, Bra–ket notation for outer product

# Further reading

* {{DEFAULTSORT:Outer Product Bilinear operators Operations on vectors Higher-order functions Articles with example Python (programming language) code