You are on page 1of 6

Dot product

Scalar product redirects here. For the abstract scalar 1.1 Algebraic denition
product, see Inner product space. For the product of a
The dot product of two vectors A = [A1 , A2 , ..., An] and
vector and a scalar, see Scalar multiplication.
B = [B1 , B2 , ..., Bn] is dened as:[1]
In mathematics, the dot product or scalar product
(sometimes inner product in the context of Euclidean
space, or rarely projection product for emphasizing the
geometric signicance), is an algebraic operation that
takes two equal-length sequences of numbers (usually
coordinate vectors) and returns a single number. This
operation can be dened either algebraically or geometrically. Algebraically, it is the sum of the products of the
corresponding entries of the two sequences of numbers.
Geometrically, it is the product of the Euclidean magnitudes of the two vectors and the cosine of the angle between them. The name dot product is derived from the
centered dot " " that is often used to designate this operation; the alternative name scalar product emphasizes
that the result is a scalar (rather than a vector).

AB=

Ai Bi = A1 B1 + A2 B2 + + An Bn

i=1

where denotes summation notation and n is the dimension of the vector space. For instance, in threedimensional space, the dot product of vectors [1, 3, 5]
and [4, 2, 1] is:
[1, 3, 5] [4, 2, 1] = (1)(4) + (3)(2) + (5)(1)
=46+5
= 3.

In three-dimensional space, the dot product contrasts


with the cross product of two vectors, which produces
a pseudovector as the result. The dot product is directly
related to the cosine of the angle between two vectors in
Euclidean space of any number of dimensions.

1.2 Geometric denition


In Euclidean space, a Euclidean vector is a geometrical
object that possesses both a magnitude and a direction.
A vector can be pictured as an arrow. Its magnitude is
its length, and its direction is the direction that the arrow
points. The magnitude of a vector A is denoted by A
. The dot product of two Euclidean vectors A and B is
dened by[2][3]

Denition

A B = A B cos(),
The dot product is often dened in one of two ways: algebraically or geometrically. The geometric denition is where is the angle between A and B.
based on the notions of angle and distance (magnitude of In particular, if A and B are orthogonal, then the angle
vectors). The equivalence of these two denitions relies between them is 90 and
on having a Cartesian coordinate system for Euclidean
space.
In modern presentations of Euclidean geometry, the
points of space are dened in terms of their Cartesian coordinates, and Euclidean space itself is commonly identied with the real coordinate space Rn . In such a presentation, the notions of length and angles are not primitive.
They are dened by means of the dot product: the length
of a vector is dened as the square root of the dot product
of the vector by itself, and the cosine of the (non oriented)
angle of two vectors of length one is dened as their dot
product. So the equivalence of the two denitions of the
dot product is a part of the equivalence of the classical
and the modern formulations of Euclidean geometry.

A B = 0.
At the other extreme, if they are codirectional, then the
angle between them is 0 and

A B = A B
This implies that the dot product of a vector A by itself is

A A = A ,
1

DEFINITION

which gives

A =

A A,

the formula for the Euclidean length of the vector.

1.3

Scalar projection and rst properties

Distributive law for the dot product

A (B + C) = A B + A C.
These properties may be summarized by saying that the
dot product is a bilinear form. Moreover, this bilinear
form is positive denite, which means that A A is never
negative and is zero if and only if A = 0.
Scalar projection

1.4 Equivalence of the denitions

The scalar projection (or scalar component) of a Eun


clidean vector A in the direction of a Euclidean vector If e1 , ..., en are the standard basis vectors in R , then we
may write
B is given by

AB = A cos ,

A = [A1 , . . . , An ] =

Ai ei

where is the angle between A and B.

B = [B1 , . . . , Bn ] =

Bi e i .

In terms of the geometric denition of the dot product,


this can be rewritten
The vectors ei are an orthonormal basis, which means that
they have unit length and are at right angles to each other.
Hence since these vectors have unit length
b
AB = A B,
b = B/ B is the unit vector in the direction of
where B
ei ei = 1
B.
The dot product is thus characterized geometrically by[4] and since they form right angles with each other, if i j,

A B = AB B = BA A .

ei ej = 0.

The dot product, dened in this manner, is homogeneous Thus in general we can say that:
under scaling in each variable, meaning that for any scalar
,
ei ej = ij .
(A) B = (A B) = A (B).
It also satises a distributive law, meaning that

Where is the Kronecker delta.


Also, by the geometric denition, for any vector ei and a
vector A, we note

2.1

Application to the cosine law

3
Unlike multiplication of ordinary numbers, where if ab = ac, then b always
equals c unless a is zero, the dot product
does not obey the cancellation law:
If a b = a c and a 0, then we can
write: a (b c) = 0 by the distributive
law; the result above says this just means
that a is perpendicular to (b c), which
still allows (b c) 0, and therefore b
c.

A ei = A ei cos = A cos = Ai ,
where Ai is the component of vector A in the direction of
ei.
Now applying the distributivity of the geometric version
of the dot product gives

AB=A

Bi ei =

Bi (A ei ) =

Bi A i ,

which is precisely the algebraic denition of the dot product. So the (geometric) dot product equals the (algebraic)
dot product.

8. Product Rule: If a and b are functions, then the


derivative (denoted by a prime ) of a b is a b +
a b.

2.1 Application to the cosine law

Properties

The dot product fullls the following properties if a, b,


and c are real vectors and r is a scalar.[1][2]
1. Commutative:
a b = b a,
which follows from the denition ( is
the angle between a and b):
ab = a b cos = b a cos =
b a.

b
a

2. Distributive over vector addition:


a (b + c) = a b + a c.
3. Bilinear:
a (rb + c) = r(a b) + (a c).
4. Scalar multiplication:
(c1 a) (c2 b) = c1 c2 (a b).
5. Not associative because the dot product between
a scalar (a b) and a vector (c) is not dened,
which means that the expressions involved in the
associative property, (a b) c or a (b c) are
both ill-dened.[5] Note however that the previously
mentioned scalar multiplication property is sometimes called the associative law for scalar and dot
product[6] or one can say that the dot product is
associative with respect to scalar multiplication because c (a b) = (c a) b = a (c b).[7]
6. Orthogonal:
Two non-zero vectors a and b are orthogonal if and only if a b = 0.
7. No cancellation:

c=ab
Triangle with vector edges a and b, separated by angle .

Main article: law of cosines


Given two vectors a and b separated by angle (see image
right), they form a triangle with a third side c = a b. The
dot product of this with itself is:
c c = (a b) (a b)
=aaabba+bb
= a2 a b a b + b2
= a2 2a b + b2
c2 = a2 + b2 2ab cos
which is the law of cosines.

5 GENERALIZATIONS

Triple product expansion

Main article: Triple product

a b = b a.
The angle between two complex vectors is then given by

This is an identity (also known as Lagranges formula)


involving the dot- and cross-products. It is written as:[1][2]
cos =

Re(a b)
.
a b

a (b c) = b(a c) c(a b),

This type of scalar product is nevertheless useful, and


which may be remembered as BAC minus CAB, keep- leads to the notions of Hermitian form and of general
ing in mind which vectors are dotted together. This for- inner product spaces.
mula nds application in simplifying vector calculations
in physics.
5.2 Inner product

Physics

In physics, vector magnitude is a scalar in the physical


sense, i.e. a physical quantity independent of the coordinate system, expressed as the product of a numerical
value and a physical unit, not just a number. The dot
product is also a scalar in this sense, given by the formula, independent of the coordinate system. Examples
include:[8][9]
Mechanical work is the dot product of force and
displacement vectors.

Main article: Inner product space


The inner product generalizes the dot product to abstract
vector spaces over a eld of scalars, being either the eld
of real numbers R or the eld of complex numbers C . It
is usually denoted by a , b .
The inner product of two vectors over the eld of complex numbers is, in general, a complex number, and is
sesquilinear instead of bilinear. An inner product space
is a normed vector space, and the inner product of a vector with itself is real and positive-denite.

Magnetic ux is the dot product of the magnetic eld 5.3 Functions


and the vector area.
The dot product is dened for vectors that have a nite
number of entries. Thus these vectors can be regarded as
discrete functions: a length-n vector u is, then, a function
5 Generalizations
with domain {k 1 k n}, and ui is a notation for
the image of i by the function/vector u.

5.1

Complex vectors

This notion can be generalized to continuous functions:


just as the inner product on vectors uses a sum over corFor vectors with complex entries, using the given deniresponding components, the inner product on functions is
tion of the dot product would lead to quite dierent propdened as an integral over some interval a x b (also
erties. For instance the dot product of a vector with itself
denoted [a, b]):[1]
would be an arbitrary complex number, and could be zero
without the vector being the zero vector (such vectors are
b
called isotropic); this in turn would have consequences
for notions like length and angle. Properties such as the u, v =
u(x)v(x)dx
a
positive-denite norm can be salvaged at the cost of giving up the symmetric and bilinear properties of the scalar Generalized further to complex functions (x) and (x),
product, through the alternative denition[1]
by analogy with the complex inner product above, gives[1]
ab=

ai bi ,

, =

(x)(x)dx.
a
where bi is the complex conjugate of bi. Then the scalar
product of any vector with itself is a non-negative real
number, and it is nonzero except for the zero vector. 5.4 Weight function
However this scalar product is thus sesquilinear rather
than bilinear: it is conjugate linear and not linear in b, Inner products can have a weight function, i.e. a function
and the scalar product is not symmetric, since
which weight each term of the inner product with a value.

5.5

Dyadics and matrices

Matrices have the Frobenius inner product, which is analogous to the vector inner product. It is dened as the sum
of the products of the corresponding components of two
matrices A and B having the same size:

A:B=

Aij Bij = tr(BH A) = tr(ABH ).

[8] K.F. Riley, M.P. Hobson, S.J. Bence (2010). Mathematical methods for physics and engineering (3rd ed.). Cambridge University Press. ISBN 978-0-521-86153-3.
[9] M. Manseld, C. OSullivan (2011). Understanding
Physics (4th ed.). John Wiley & Sons. ISBN 978-0-470746370.

8 External links

T
Hazewinkel,
Michiel, ed. (2001), Inner product,
Aij Bij = tr(BT A) = tr(ABT ) = tr(AT B) = tr(BA
).
Encyclopedia of Mathematics, Springer, ISBN 978i
j
1-55608-010-4
Dyadics have a dot product and double dot product
dened on them, see Dyadics (Product of dyadic and
Weisstein, Eric W., Dot product, MathWorld.
dyadic) for their denitions.
Explanation of dot product including with complex
vectors

A:B=

5.6

Tensors

The inner product between a tensor of order n and a tensor of order m is a tensor of order n + m 2, see tensor
contraction for details.

See also
CauchySchwarz inequality
Cross product
Matrix multiplication

References

[1] S. Lipschutz, M. Lipson (2009).


Linear Algebra
(Schaums Outlines) (4th ed.). McGraw Hill. ISBN 9780-07-154352-1.
[2] M.R. Spiegel, S. Lipschutz, D. Spellman (2009). Vector Analysis (Schaums Outlines) (2nd ed.). McGraw Hill.
ISBN 978-0-07-161545-7.
[3] A I Borisenko; I E Taparov (1968). Vector and tensor
analysis with applications. Translated by Richard Silverman. Dover. p. 14.
[4] Arfken, G. B.; Weber, H. J. (2000). Mathematical Methods for Physicists (5th ed.). Boston, MA: Academic Press.
pp. 1415. ISBN 978-0-12-059825-0..
[5] Weisstein, Eric W. Dot Product. From MathWorld-A Wolfram Web Resource. http://mathworld.wolfram.
com/DotProduct.html
[6] T. Bancho; J. Wermer (1983). Linear Algebra Through
Geometry. Springer Science & Business Media. p. 12.
ISBN 978-1-4684-0161-5.
[7] A. Bedford; Wallace L. Fowler (2008). Engineering Mechanics: Statics (5th ed.). Prentice Hall. p. 60. ISBN
978-0-13-612915-8.

Dot Product by Bruce Torrence, Wolfram


Demonstrations Project, 2007.

9 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

Text and image sources, contributors, and licenses

9.1

Text

Dot product Source: https://en.wikipedia.org/wiki/Dot_product?oldid=710044247 Contributors: Dan~enwiki, Tarquin, Mrwojo, Bdesham, Patrick, Michael Hardy, Tim Starling, DIG~enwiki, SGBailey, Gbleem, SebastianHelm, Charles Matthews, Timwi, Dysprosia,
Omegatron, Kk~enwiki, Robbot, Mazin07, Fredrik, Romanm, Naddy, Gandalf61, MathMartin, Wereon, Tosha, Giftlite, BenFrantzDale, MSGJ, Msm, Wwoods, Daniel Brockman, Matt Crypto, Tristanreid, Sreyan, Lockeownzj00, MarkSweep, Icairns, Frau Hitt~enwiki,
Daviis~enwiki, Rich Farmbrough, Andros 1337, Dfan, Kwamikagami, Danshil, O18, Slicky, NanoTy, Kundor, Crust, Landroni, ArbiterOne, Davorj, Tony Sidaway, Oleg Alexandrov, LOL, StradivariusTV, GregorB, Isnow, Pfalstad, Qwertyus, NeoUrfahraner, JVz,
Marozols, Yamamoto Ichiro, Windchaser, Fresheneesz, Kri, Chobot, Jersey Devil, Zath42, Wavelength, Hairy Dude, Hillman, Michael
Slone, MrHumperdink, Markus Schmaus, KSmrq, Archelon, Vanished user 1029384756, Akulaalfa, Sangwine, Voidxor, Samuel Huang,
Ospalh, Amadib, Tlevine, Heptazane, Naught101, HereToHelp, Ghazer~enwiki, Selfworm, InverseHypercube, Melchoir, Alksub, Mcherm,
Mcld, GBL, Bluebot, Octahedron80, Audriusa, Cybercobra, Savidan, Hgilbert, Flip619, WhiteHatLurker, Luokehao, Hypnosi, Dr.K.,
Emote, Harold f, CBM, Prlsmith, Ezrakilty, Cydebot, Arauzo, Shirulashem, Epbr123, Ryansca, Karlmeerbergen, LRG, Kborer, NocNokNeo, Icep, AntiVandalBot, JAnDbot, Quentar~enwiki, Sanchom, Matt Kovacs, PhilKnight, Crunchy Numbers, M samadi, Redbaron486, Policron, Fylwind, VolkovBot, Pleasantville, JohnBlackburne, LokiClock, Slaunger, Anonymous Dissident, Victimoeisure,
Howeworth, PaulTanenbaum, Smoo222, Neparis, SieBot, LeadSongDog, Interchange88, Paolo.dL, Oxymoron83, Rightisright4250, ClueBot, Justin W Smith, R000t, Niceguyedc, LizardJr8, Ecov, GoldenGoose100, Bender2k14, Muhandes, J.Gowers, Humanengr, XLinkBot,
Dr3d, Marc van Leeuwen, Kal-El-Bot, Addbot, Narayansg, Econotechie, MrVanBot, AndersBot, Smartyepp, Zorrobot, TeH nOmInAtOr,
Jarble, Luckas-bot, Yobot, Fanner, Ehaussecker, AnomieBOT, Gtz, Tucoxn, Ahmedo15, Raamaiden, Aptronotus, WaysToEscape,
Crispin.cheddarcock, Josemanimala, Sawomir Biay, Khashishi, Elockid, Rosenlind, Chezz444, Nguoiviet979, Rausch, Duoduoduo,
Harleymeyer, Limited Atonement, Jfmantis, TjBot, Mortees~enwiki, VACowboy41, EmausBot, Kpuersh, Dcirovic, Slawekb, ZroBot,
Carsonkahn, Quondum, D.Lazard, AManWithNoPlan, Maschen, ChuispastonBot, DKPrestige, Locador, ClueBot NG, Gareth GrithJones, ThomasMcLeod, AvocatoBot, Dmawxc, , Matthew.p.korte, PsiEpsilon, Jdogzz,
, ChrisGualtieri, Khazar2,
Gundamlh, JoghurtGF, Ecce simia, HodgeBrad, Coobit, Couryt, 27394Days, Sci40002, Dlambert2499, Aqsa Idrees, H.dryad and Anonymous: 237

9.2

Images

File:Dot_Product.svg Source: https://upload.wikimedia.org/wikipedia/commons/3/3e/Dot_Product.svg License: Public domain Contributors: No machine-readable source provided. Own work assumed (based on copyright claims). Original artist: No machine-readable author
provided. Mazin07 assumed (based on copyright claims).
File:Dot_product_cosine_rule.svg Source: https://upload.wikimedia.org/wikipedia/commons/5/51/Dot_product_cosine_rule.svg License: CC0 Contributors: Own work Original artist: Maschen
File:Dot_product_distributive_law.svg Source: https://upload.wikimedia.org/wikipedia/commons/a/aa/Dot_product_distributive_law.
svg License: CC BY-SA 3.0 Contributors: Created using GeoGebra Original artist: Slawekb

9.3

Content license

Creative Commons Attribution-Share Alike 3.0

You might also like