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 matrice ...
, 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 (a tuple) that describes the vector in terms of a particular ordered basis. An easy example may be a position such as (5, 2, 1) in a 3-dimensio ...
s is a
matrix
Matrix most commonly refers to:
* ''The Matrix'' (franchise), an American media franchise
** '' The Matrix'', a 1999 science-fiction action film
** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
. 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
In mathematics, the tensor product V \otimes W of two vector spaces and (over the same field) is a vector space to which is associated a bilinear map V\times W \to V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of V \otime ...
, 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 as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
(a special case of "inner product"), 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 generalization of the outer product (which is denoted by the same symbol) from vectors to ...
, which takes a pair of matrices as input and produces a block matrix
*
Standard matrix multiplication
Definition
Given two vectors of size
and
respectively
their outer product, denoted
is defined as the
matrix
obtained by multiplying each element of
by each element of
:
Or in index notation:
Denoting the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
by
if given an
vector
then
If given a
vector
then
If
and
are vectors of the same dimension bigger than 1, then
.
The outer product
is equivalent to a
matrix multiplication provided that
is represented as a
column vector and
as a
column vector (which makes
a row vector).
For instance, if
and
then
For
complex vectors, it is often useful to take the
conjugate transpose of
denoted
or
:
Contrast with Euclidean inner product
If
then one can take the matrix product the other way, yielding a scalar (or
matrix):
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, often ...
for
Euclidean vector spaces,
better known as the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
. The dot product is the
trace of the outer product. Unlike the dot 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
with dimensions
and
, their outer product
is a tensor with dimensions
and entries
For example, if
is of order 3 with dimensions
and
is of order 2 with dimensions
then their outer product
is of order 5 with dimensions
If
has a component and
has a component , then the component of
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
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.
Connection with the matrix product
Given a pair of matrices
of size
and
of size
, consider the
matrix product defined as usual as a matrix of size
.
Now let
be the
-th column vector of
and let
be the
-th row vector of
. Then
can be expressed as a sum of column-by-row outer products:
Note the duality of this expression 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, often ...
entries (or
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
):
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 (
) and right (
) singular vectors, scaled by the corresponding nonzero singular value
:
This result implies that
can be expressed as a sum of rank-1 matrices with
spectral norm 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:
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
In mathematics, a tensor is an algebraic object that describes a multilinear relationship between sets of algebraic objects related to a vector space. Tensors may map between different objects such as vectors, scalars, and even other tensor ...
", 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 whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called ''scalars''. Scalars are often real numbers, but can ...
s. The outer product of
and
is the element
.
If is an
inner product space
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, often ...
, then it is possible to define the outer product as a linear map . In which case, the linear map
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 . The outer product is then given by
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 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 ...
= 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, 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 generalization of the outer product (which is denoted by the same symbol) from vectors to ...
, 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 sound, images, and scientific measurements. Signal processing techniques are used to optimize transmissions, ...
, 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:
The determinant
In mathematics, the determinant is a scalar value that is a function of the entries of a square matrix. It characterizes some properties of the matrix and the linear map represented by the matrix. In particular, the determinant is nonzero if a ...
of this matrix is because of the commutative property of C.
In the theory of spinors in three dimensions
In mathematics, the spinor concept as specialised to three dimensions can be treated by means of the traditional notions of dot product and cross product. This is part of the detailed algebraic discussion of the rotation group SO(3).
Formulation
...
, 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 geometr ...
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
A logical matrix, binary matrix, relation matrix, Boolean matrix, or (0, 1) matrix is a matrix (mathematics), matrix with entries from the Boolean domain Such a matrix can be used to represent a binary relation between a pair of finite sets.
...
. The logical operation and
or AND may refer to:
Logic, grammar, and computing
* Conjunction (grammar), connecting two words, phrases, or clauses
* Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition
* Bitwise AND, a boolea ...
takes the place of multiplication. The outer product of two logical vectors and 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.[Ki Hang Kim (1982) ''Boolean Matrix Theory and Applications'', page 37, ]Marcel Dekker
Marcel Dekker was a journal and encyclopedia publishing company with editorial boards found in New York City. Dekker encyclopedias are now published by CRC Press, part of the Taylor and Francis publishing group.
History
Initially a textbook p ...
See also
* Dyadics
* Householder transformation
* Norm (mathematics)
In mathematics, a norm is a 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: it commutes with scaling, obeys a form of the triangle inequality, and ...
* Scatter matrix : ''For the notion in quantum mechanics, see scattering matrix.''
In multivariate statistics and probability theory, the scatter matrix is a statistic that is used to make estimates of the covariance matrix, for instance of the multivariate norm ...
* Ricci calculus
Products
* Cartesian product
* 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
* Hadamard product
Duality
* Complex conjugate
* Conjugate transpose
* Transpose
* Bra–ket notation for outer product
References
Further reading
*
{{DEFAULTSORT:Outer Product
Bilinear maps
Operations on vectors
Higher-order functions
Articles with example Python (programming language) code