Outer Product
   HOME

TheInfoList



OR:

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 (mathemat ...
, the outer product of two coordinate vectors is the matrix whose entries are all products of an element in the first vector with an element in the second vector. If the two coordinate vectors have dimensions ''n'' and ''m'', then their outer product is an ''n'' × ''m'' matrix. More generally, given two
tensor In mathematics, a tensor is an algebraic object that describes a multilinear relationship between sets of algebraic objects associated with a vector space. Tensors may map between different objects such as vectors, scalars, and even other ...
s (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, the tensor product V \otimes W of two vector spaces V and W (over the same field) is a vector space to which is associated a bilinear map V\times W \rightarrow V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of ...
, and can be used to define the tensor algebra. The outer product contrasts with: * The
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
(a special case of "
inner product In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
"), which takes a pair of coordinate vectors as input and produces a scalar * The
Kronecker product In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a specialization of the tensor product (which is denoted by the same symbol) from vector ...
, which takes a pair of matrices as input and produces a block matrix * Standard
matrix multiplication In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix (mathematics), matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the n ...


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 \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: :(\mathbf \otimes \mathbf)_ = u_i v_j Denoting the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
by \,\cdot,\, if given an n \times 1 vector \mathbf, then (\mathbf \otimes \mathbf) \mathbf = (\mathbf \cdot \mathbf) \mathbf. If given a 1 \times m vector \mathbf, then \mathbf (\mathbf \otimes \mathbf) = (\mathbf \cdot \mathbf) \mathbf^. If \mathbf and \mathbf are vectors of the same dimension bigger than 1, then \det (\mathbf \otimes\mathbf) = 0. The outer product \mathbf \otimes \mathbf is equivalent to a
matrix multiplication In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix (mathematics), matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the n ...
\mathbf \mathbf^, provided that \mathbf is represented as a m \times 1
column vector In linear algebra, a column vector with elements is an m \times 1 matrix consisting of a single column of entries, for example, \boldsymbol = \begin x_1 \\ x_2 \\ \vdots \\ x_m \end. Similarly, a row vector is a 1 \times n matrix for some , c ...
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 Complex commonly refers to: * Complexity, the behaviour of a system whose components interact in multiple ways so possible interactions are difficult to describe ** Complex system, a system composed of many components which may interact with each ...
vectors, it is often useful to take the conjugate transpose of \mathbf, denoted \mathbf^\dagger or \left(\mathbf^\textsf\right)^*: :\mathbf \otimes \mathbf = \mathbf \mathbf^\dagger = \mathbf \left(\mathbf^\textsf\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, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
for
Euclidean vector space Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces'' ...
s, better known as the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
. The dot product is the trace of the outer product. Unlike the dot product, 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(\mathbf \otimes \mathbf\right)\mathbf = \mathbf\left\langle\mathbf, \mathbf\right\rangle.


The outer product of tensors

Given two tensors \mathbf, \mathbf with dimensions (k_1, k_2, \dots, k_m) and (l_1, l_2, \dots, l_n), their outer product \mathbf \otimes \mathbf is a tensor with dimensions (k_1, k_2, \dots, k_m, l_1, l_2, \dots, l_n) and entries :(\mathbf \otimes \mathbf)_ = u_ v_ For example, if \mathbf is of order 3 with dimensions (3, 5, 7) and \mathbf is of order 2 with dimensions (10, 100), then their outer product \mathbf is of order 5 with dimensions (3, 5, 7, 10, 100). 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(\mathbf \otimes_\text \mathbf) (The order of the vectors is reversed on 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.


Connection with the matrix product

Given a pair of matrices \mathbf of size m\times p and \mathbf of size p\times n, consider the matrix product \mathbf = \mathbf\,\mathbf defined as usual as a matrix of size m\times n. Now let \mathbf a^\text_k be the k-th column vector of \mathbf A and let \mathbf b^\text_k be the k-th row vector of \mathbf B. Then \mathbf can be expressed as a sum of column-by-row outer products: :\mathbf = \mathbf\, \mathbf = \left( \sum_^p _\, _ \right)_ = \begin & & \\ \mathbf a^\text_ & \cdots & \mathbf a^\text_ \\ & & \end \begin & \mathbf b^\text_ & \\ & \vdots & \\ & \mathbf b^\text_ & \end = \sum_^p \mathbf a^\text_k \mathbf b^\text_k This expression has duality with the more common one as a matrix built with row-by-column
inner product In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
entries (or
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
): C_ = \langle\rangle This relation is relevant in the application of the Singular Value Decomposition (SVD) (and Spectral Decomposition as a special case). In particular, the decomposition can be interpreted as the sum of outer products of each left (\mathbf_k) and right (\mathbf_k) singular vectors, scaled by the corresponding nonzero singular value \sigma_k: :\mathbf = \mathbf = \sum_^(\mathbf_k \otimes \mathbf_k) \, \sigma_k This result implies that \mathbf can be expressed as a sum of rank-1 matrices with spectral norm \sigma_k in decreasing order. This explains the fact why, in general, the last terms contribute less, which motivates the use of the truncated SVD as an approximation. The first term is the least squares fit of a matrix to an outer product of vectors.


Properties

The outer product of vectors satisfies the following properties: :\begin (\mathbf \otimes \mathbf)^\textsf &= (\mathbf \otimes \mathbf) \\ (\mathbf + \mathbf) \otimes \mathbf &= \mathbf \otimes \mathbf + \mathbf \otimes \mathbf \\ \mathbf \otimes (\mathbf + \mathbf) &= \mathbf \otimes \mathbf + \mathbf \otimes \mathbf \\ c (\mathbf \otimes \mathbf) &= (c\mathbf) \otimes \mathbf = \mathbf \otimes (c\mathbf) \end The outer product of tensors satisfies the additional
associativity In mathematics, the associative property is a property of some binary operations that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a Validity (logic), valid rule of replaceme ...
property: : (\mathbf \otimes \mathbf) \otimes \mathbf = \mathbf \otimes (\mathbf \otimes \mathbf)


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 u. 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 and be two
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
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 is an inner product space, then it is possible to define the outer product as a linear map . In this case, the linear map \mathbf x \mapsto \langle \mathbf v, \mathbf x\rangle is an element of the
dual space In mathematics, any vector space ''V'' has a corresponding dual vector space (or just dual space for short) consisting of all linear forms on ''V,'' together with the vector space structure of pointwise addition and scalar multiplication by cons ...
of , as this maps linearly a vector into its underlying field, of which \langle \mathbf v, \mathbf x\rangle is an element. The outer product is then given by :(\mathbf w \otimes \mathbf v) (\mathbf x) = \left\langle \mathbf v, \mathbf x \right\rangle \mathbf w. This shows why a conjugate transpose of 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, f, of two one-dimensional arrays, A and B, is a two-dimensional array C such that C , j= 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, as Outer , A, B/syntaxhighlight>. In
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
, 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 In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a specialization of the tensor product (which is denoted by the same symbol) from vector ...
, 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 subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as audio signal processing, sound, image processing, images, Scalar potential, potential fields, Seismic tomograph ...
, and image compression.


Spinors

Suppose so that and are in . Then the outer product of these complex 2-vectors is an element of , the 2 × 2 complex matrices: :\begin sw & tw \\ sz & tz \end. The
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
of this matrix is because of the
commutative property In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a p ...
of . 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 (; 9 April 1869 – 6 May 1951) was an influential French mathematician who did fundamental work in the theory of Lie groups, differential systems (coordinate-free geometric formulation of PDEs), and differential geometry. He ...
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 and a pioneer of quantum mechanics. In 1945, after having been nominated by Albert Einstein, Pauli received the Nobel Prize in Physics "for the ...
in 1927 so that 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 and is given by the logical matrix \left(a_\right) = \left(u_i \land v_j\right). This type of matrix is used in the study of
binary relation In mathematics, a binary relation associates some elements of one Set (mathematics), set called the ''domain'' with some elements of another set called the ''codomain''. Precisely, a binary relation over sets X and Y is a set of ordered pairs ...
s, 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) In mathematics, a norm is a function (mathematics), function from a real or complex vector space to the non-negative real numbers that behaves in certain ways like the distance from the Origin (mathematics), origin: it Equivariant map, commutes w ...
* Ricci calculus * Scatter matrix


Products

*
Cartesian product In mathematics, specifically set theory, the Cartesian product of two sets and , denoted , is the set of all ordered pairs where is an element of and is an element of . In terms of set-builder notation, that is A\times B = \. A table c ...
*
Cross product In mathematics, the cross product or vector product (occasionally directed area product, to emphasize its geometric significance) is a binary operation on two vectors in a three-dimensional oriented Euclidean vector space (named here E), and ...
*
Exterior product In mathematics, specifically in topology, the interior of a subset of a topological space is the union of all subsets of that are open in . A point that is in the interior of is an interior point of . The interior of is the complement of ...
*
Hadamard product (matrices) In mathematics, the Hadamard product (also known as the element-wise product, entrywise product or Schur product) is a binary operation that takes in two Matrix (mathematics), matrices of the same dimensions and returns a matrix of the multiplied ...


Duality

* Bra–ket notation for outer product *
Complex conjugate In mathematics, the complex conjugate of a complex number is the number with an equal real part and an imaginary part equal in magnitude but opposite in sign. That is, if a and b are real numbers, then the complex conjugate of a + bi is a - ...
* Conjugate transpose *
Transpose In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal; that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...


References


Further reading

* {{Linear algebra Bilinear maps Higher-order functions Operations on vectors