Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Outer product

From Wikipedia, the free encyclopedia
Vector operation
Not to be confused withExterior product.

Inlinear algebra, theouter product of twocoordinate 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 dimensionsn andm, then their outer product is ann ×m matrix. More generally, given twotensors (multidimensional arrays of numbers), their outer product is a tensor. The outer product of tensors is also referred to as theirtensor product, and can be used to define thetensor algebra.

The outer product contrasts with:

Definition

[edit]

Given two vectors of sizem×1{\displaystyle m\times 1} andn×1{\displaystyle n\times 1} respectively

u=[u1u2um],v=[v1v2vn]{\displaystyle \mathbf {u} ={\begin{bmatrix}u_{1}\\u_{2}\\\vdots \\u_{m}\end{bmatrix}},\quad \mathbf {v} ={\begin{bmatrix}v_{1}\\v_{2}\\\vdots \\v_{n}\end{bmatrix}}}

their outer product, denoteduv,{\displaystyle \mathbf {u} \otimes \mathbf {v} ,} is defined as them×n{\displaystyle m\times n} matrixA{\displaystyle \mathbf {A} } obtained by multiplying each element ofu{\displaystyle \mathbf {u} } by each element ofv{\displaystyle \mathbf {v} }:[1]

uv=A=[u1v1u1v2u1vnu2v1u2v2u2vnumv1umv2umvn]{\displaystyle \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:

(uv)ij=uivj{\displaystyle (\mathbf {u} \otimes \mathbf {v} )_{ij}=u_{i}v_{j}}

Denoting thedot product by,{\displaystyle \,\cdot ,\,} if given ann×1{\displaystyle n\times 1} vectorw,{\displaystyle \mathbf {w} ,} then(uv)w=(vw)u.{\displaystyle (\mathbf {u} \otimes \mathbf {v} )\mathbf {w} =(\mathbf {v} \cdot \mathbf {w} )\mathbf {u} .} If given a1×m{\displaystyle 1\times m} vectorx,{\displaystyle \mathbf {x} ,} thenx(uv)=(xu)vT.{\displaystyle \mathbf {x} (\mathbf {u} \otimes \mathbf {v} )=(\mathbf {x} \cdot \mathbf {u} )\mathbf {v} ^{\operatorname {T} }.}

Ifu{\displaystyle \mathbf {u} } andv{\displaystyle \mathbf {v} } are vectors of the same dimension bigger than 1, thendet(uv)=0{\displaystyle \det(\mathbf {u} \otimes \mathbf {v} )=0}.

The outer productuv{\displaystyle \mathbf {u} \otimes \mathbf {v} } is equivalent to amatrix multiplicationuvT,{\displaystyle \mathbf {u} \mathbf {v} ^{\operatorname {T} },} provided thatu{\displaystyle \mathbf {u} } is represented as am×1{\displaystyle m\times 1}column vector andv{\displaystyle \mathbf {v} } as an×1{\displaystyle n\times 1} column vector (which makesvT{\displaystyle \mathbf {v} ^{\operatorname {T} }} a row vector).[2][3] For instance, ifm=4{\displaystyle m=4} andn=3,{\displaystyle n=3,} then[4]

uv=uvT=[u1u2u3u4][v1v2v3]=[u1v1u1v2u1v3u2v1u2v2u2v3u3v1u3v2u3v3u4v1u4v2u4v3].{\displaystyle \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}}.}

Forcomplex vectors, it is often useful to take theconjugate transpose ofv,{\displaystyle \mathbf {v} ,} denotedv{\displaystyle \mathbf {v} ^{\dagger }} or(vT){\displaystyle \left(\mathbf {v} ^{\textsf {T}}\right)^{*}}:

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

Contrast with Euclidean inner product

[edit]

Ifm=n,{\displaystyle m=n,} then one can take the matrix product the other way, yielding a scalar (or1×1{\displaystyle 1\times 1} matrix):

u,v=uTv{\displaystyle \left\langle \mathbf {u} ,\mathbf {v} \right\rangle =\mathbf {u} ^{\textsf {T}}\mathbf {v} }

which is the standardinner product forEuclidean vector spaces,[3] better known as thedot product. The dot product is thetrace of the outer product.[5] Unlike the dot product, the outer product is not commutative.

Multiplication of a vectorw{\displaystyle \mathbf {w} } by the matrixuv{\displaystyle \mathbf {u} \otimes \mathbf {v} } can be written in terms of the inner product, using the relation(uv)w=uv,w{\displaystyle \left(\mathbf {u} \otimes \mathbf {v} \right)\mathbf {w} =\mathbf {u} \left\langle \mathbf {v} ,\mathbf {w} \right\rangle }.

The outer product of tensors

[edit]

Given two tensorsu,v{\displaystyle \mathbf {u} ,\mathbf {v} } with dimensions(k1,k2,,km){\displaystyle (k_{1},k_{2},\dots ,k_{m})} and(l1,l2,,ln){\displaystyle (l_{1},l_{2},\dots ,l_{n})}, their outer productuv{\displaystyle \mathbf {u} \otimes \mathbf {v} } is a tensor with dimensions(k1,k2,,km,l1,l2,,ln){\displaystyle (k_{1},k_{2},\dots ,k_{m},l_{1},l_{2},\dots ,l_{n})} and entries

(uv)i1,i2,im,j1,j2,,jn=ui1,i2,,imvj1,j2,,jn{\displaystyle (\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, ifA{\displaystyle \mathbf {A} } is of order 3 with dimensions(3,5,7){\displaystyle (3,5,7)} andB{\displaystyle \mathbf {B} } is of order 2 with dimensions(10,100),{\displaystyle (10,100),} then their outer productC{\displaystyle \mathbf {C} } is of order 5 with dimensions(3,5,7,10,100).{\displaystyle (3,5,7,10,100).} IfA{\displaystyle \mathbf {A} } has a componentA[2, 2, 4] = 11 andB{\displaystyle \mathbf {B} } has a componentB[8, 88] = 13, then the component ofC{\displaystyle \mathbf {C} } formed by the outer product isC[2, 2, 4, 8, 88] = 143.

Connection with the Kronecker product

[edit]

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

Ifu=[123]T{\displaystyle \mathbf {u} ={\begin{bmatrix}1&2&3\end{bmatrix}}^{\textsf {T}}} andv=[45]T{\displaystyle \mathbf {v} ={\begin{bmatrix}4&5\end{bmatrix}}^{\textsf {T}}}, we have:

uKronv=[458101215],uouterv=[458101215]{\displaystyle {\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 ofvectorization (or flattening) of the outer product. In particular, for two column vectorsu{\displaystyle \mathbf {u} } andv{\displaystyle \mathbf {v} }, we can write:

uKronv=vec(vouteru){\displaystyle \mathbf {u} \otimes _{\text{Kron}}\mathbf {v} =\operatorname {vec} (\mathbf {v} \otimes _{\text{outer}}\mathbf {u} )}

(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

uKronvT=uvT=uouterv{\displaystyle \mathbf {u} \otimes _{\text{Kron}}\mathbf {v} ^{\textsf {T}}=\mathbf {u} \mathbf {v} ^{\textsf {T}}=\mathbf {u} \otimes _{\text{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.

Connection with the matrix product

[edit]

Given a pair of matricesA{\displaystyle \mathbf {A} } of sizem×p{\displaystyle m\times p} andB{\displaystyle \mathbf {B} } of sizep×n{\displaystyle p\times n}, consider thematrix productC=AB{\displaystyle \mathbf {C} =\mathbf {A} \,\mathbf {B} } defined as usual as a matrix of sizem×n{\displaystyle m\times n}.

Now letakcol{\displaystyle \mathbf {a} _{k}^{\text{col}}} be thek{\displaystyle k}-th column vector ofA{\displaystyle \mathbf {A} } and letbkrow{\displaystyle \mathbf {b} _{k}^{\text{row}}} be thek{\displaystyle k}-th row vector ofB{\displaystyle \mathbf {B} }. ThenC{\displaystyle \mathbf {C} } can be expressed as a sum of column-by-row outer products:

C=AB=(k=1pAikBkj)1im1jn=[a1colapcol][b1rowbprow]=k=1pakcolbkrow{\displaystyle \mathbf {C} =\mathbf {A} \,\mathbf {B} =\left(\sum _{k=1}^{p}{A}_{ik}\,{B}_{kj}\right)_{\begin{matrix}1\leq i\leq m\\[-20pt]1\leq j\leq n\end{matrix}}={\begin{bmatrix}&&\\\mathbf {a} _{1}^{\text{col}}&\cdots &\mathbf {a} _{p}^{\text{col}}\\&&\end{bmatrix}}{\begin{bmatrix}&\mathbf {b} _{1}^{\text{row}}&\\&\vdots &\\&\mathbf {b} _{p}^{\text{row}}&\end{bmatrix}}=\sum _{k=1}^{p}\mathbf {a} _{k}^{\text{col}}\mathbf {b} _{k}^{\text{row}}}

This expression has duality with the more common one as a matrix built with row-by-columninner product entries (ordot product):Cij=airow,bjcol{\displaystyle C_{ij}=\langle {\mathbf {a} _{i}^{\text{row}},\,\mathbf {b} _{j}^{\text{col}}}\rangle }

This relation is relevant[6] in the application of theSingular Value Decomposition (SVD) (andSpectral Decomposition as a special case). In particular, the decomposition can be interpreted as the sum of outer products of each left (uk{\displaystyle \mathbf {u} _{k}}) and right (vk{\displaystyle \mathbf {v} _{k}}) singular vectors, scaled by the corresponding nonzero singular valueσk{\displaystyle \sigma _{k}}:

A=UΣVT=k=1rank(A)(ukvk)σk{\displaystyle \mathbf {A} =\mathbf {U\Sigma V^{T}} =\sum _{k=1}^{\operatorname {rank} (A)}(\mathbf {u} _{k}\otimes \mathbf {v} _{k})\,\sigma _{k}}

This result implies thatA{\displaystyle \mathbf {A} } can be expressed as a sum of rank-1 matrices withspectral normσk{\displaystyle \sigma _{k}} in decreasing order. This explains the fact why, in general, the last terms contribute less, which motivates the use of thetruncated SVD as an approximation. The first term is theleast squares fit of a matrix to an outer product of vectors.

Properties

[edit]

The outer product of vectors satisfies the following properties:

(uv)T=(vu)(v+w)u=vu+wuu(v+w)=uv+uwc(vu)=(cv)u=v(cu){\displaystyle {\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 additionalassociativity property:

(uv)w=u(vw){\displaystyle (\mathbf {u} \otimes \mathbf {v} )\otimes \mathbf {w} =\mathbf {u} \otimes (\mathbf {v} \otimes \mathbf {w} )}

Rank of an outer product

[edit]

Ifu andv are both nonzero, then the outer product matrixuvT always hasmatrix rank 1. Indeed, the columns of the outer product are all proportional tou. Thus they are alllinearly 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)

[edit]

LetV andW be twovector spaces. The outer product ofvV{\displaystyle \mathbf {v} \in V} andwW{\displaystyle \mathbf {w} \in W} is the elementvwVW{\displaystyle \mathbf {v} \otimes \mathbf {w} \in V\otimes W}.

IfV is aninner product space, then it is possible to define the outer product as a linear mapVW. In this case, the linear mapxv,x{\displaystyle \mathbf {x} \mapsto \langle \mathbf {v} ,\mathbf {x} \rangle } is an element of thedual space ofV, as this maps linearly a vector into its underlying field, of whichv,x{\displaystyle \langle \mathbf {v} ,\mathbf {x} \rangle } is an element. The outer productVW is then given by

(wv)(x)=v,xw.{\displaystyle (\mathbf {w} \otimes \mathbf {v} )(\mathbf {x} )=\left\langle \mathbf {v} ,\mathbf {x} \right\rangle \mathbf {w} .}

This shows why a conjugate transpose ofv is commonly taken in the complex case.

In programming languages

[edit]

In some programming languages, given a two-argument functionf (or a binary operator), the outer product,f, of two one-dimensional arrays,A andB, is a two-dimensional arrayC such thatC[i, j] = f(A[i], B[j]). This is syntactically represented in various ways: inAPL, as the infix binary operator∘.f; inJ, as the postfix adverbf/; inR, as the functionouter(A,B,f) or the special%o%;[7] inMathematica, asOuter[f,A,B]. InMATLAB, the functionkron(A,B) is used for this product. These often generalize to multi-dimensional arguments, and more than two arguments.

In thePython libraryNumPy, the outer product can be computed with functionnp.outer().[8] In contrast,np.kron results in a flat array. The outer product of multidimensional arrays can be computed usingnp.multiply.outer.

Applications

[edit]

As the outer product is closely related to theKronecker product, some of the applications of the Kronecker product use outer products. These applications are found in quantum theory,signal processing, andimage compression.[9]

Spinors

[edit]

Supposes,t,w,zC so that(s,t) and(w,z) are inC2. Then the outer product of these complex 2-vectors is an element ofM(2,C), the 2 × 2 complex matrices:

(swtwsztz).{\displaystyle {\begin{pmatrix}sw&tw\\sz&tz\end{pmatrix}}.}

Thedeterminant of this matrix isswtzsztw = 0 because of thecommutative property ofC.

In the theory ofspinors in three dimensions, these matrices are associated withisotropic vectors due to this null property.Élie Cartan described this construction in 1937,[10] but it was introduced byWolfgang Pauli in 1927[11] so thatM(2,C) has come to be calledPauli algebra.

Concepts

[edit]

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 alogical vector, a special case of alogical matrix. The logical operationand takes the place of multiplication. The outer product of two logical vectors(ui) and(vj) is given by the logical matrix(aij)=(uivj){\displaystyle \left(a_{ij}\right)=\left(u_{i}\land v_{j}\right)}. This type of matrix is used in the study ofbinary relations, and is called arectangular relation or across-vector.[12]

See also

[edit]

Products

[edit]

Duality

[edit]

References

[edit]
  1. ^Lerner, R. G.; Trigg, G. L. (1991).Encyclopaedia of Physics (2nd ed.). VHC.ISBN 0-89573-752-3.
  2. ^Lipschutz, S.; Lipson, M. (2009).Linear Algebra. Schaum’s Outlines (4th ed.). McGraw-Hill.ISBN 978-0-07-154352-1.
  3. ^abKeller, Frank (February 23, 2020)."Algebraic Properties of Matrices; Transpose; Inner and Outer Product"(PDF).inf.ed.ac.uk.Archived(PDF) from the original on 2017-12-15. RetrievedSeptember 6, 2020.
  4. ^James M. Ortega (1987)Matrix Theory: A Second Course, page 7,Plenum PressISBN 0-306-42433-9
  5. ^Stengel, Robert F. (1994).Optimal Control and Estimation. New York: Dover Publications. p. 26.ISBN 0-486-68200-5.
  6. ^Trefethen, Lloyd N.; Bau III, David (1997).Numerical linear algebra. Philadelphia: Society for Industrial and Applied Mathematics.ISBN 978-0-89871-361-9.
  7. ^"outer function | R Documentation".rdocumentation.org. Retrieved2020-09-07.
  8. ^"numpy.outer — NumPy v1.19 Manual".numpy.org. Retrieved2020-09-07.
  9. ^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 978-981-4335-31-7.
  10. ^Élie Cartan (1937)Lecons sur la theorie des spineurs, translated 1966:The Theory of Spinors, Hermann, Paris
  11. ^Pertti Lounesto (1997)Clifford Algebras and Spinors, page 51,Cambridge University PressISBN 0-521-59916-4
  12. ^Ki-Hang Kim (1982)Boolean Matrix Theory and Applications, page 37,Marcel DekkerISBN 0-8247-1788-0

Further reading

[edit]
Basic concepts
Three dimensional Euclidean space
Matrices
Bilinear
Multilinear algebra
Vector space constructions
Numerical
Retrieved from "https://en.wikipedia.org/w/index.php?title=Outer_product&oldid=1281270955"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp