Browse Definitions :
Definition

dot product (scalar product)

What is dot product (scalar product)?

The dot product, also called scalar product, is a measure of how closely two vectors align, in terms of the directions they point. The measure is a scalar number (single value) that can be used to compare the two vectors and to understand the impact of repositioning one or both of them. The dot product is obtained by performing mathematical calculations on the vector properties.

A vector is a quantity that has both direction and magnitude (the vector's length). Figure 1 shows two vectors (a and b) on a two-dimensional Cartesian plane. Vector a has a magnitude of 8 and is at a 115-degree angle from the x-axis (moving counterclockwise). Vector b has a magnitude of 10 and is at a 45-degree angle from the x-axis. The angle between the two vectors -- represented by the Greek letter theta (θ) -- is 70 degrees, which is calculated by subtracting 45 degrees from 115 degrees.

Two vectors (a and b) on a two-dimensional Cartesian plane
Figure 1. Diagram showing two vectors (a and b) on a two-dimensional Cartesian plane.

If the magnitude of two vectors and the angle between them is known, it is easy to calculate the dot product. The dot product is represented by using a dot between the two vector references, in this case, a and b, as shown in the following formula:

a • b

The full equation for finding the dot product is a bit more involved. This entails multiplying the magnitude of vector a by the magnitude of vector b and then multiplying the product by the cosine (cos) of the angle between the vectors, as shown in the following equation:

a • b = |a| × |b| × cos(θ)

The vertical bars indicate that these values are the vector's magnitude. Sometimes double bars are used instead of single bars. If the values from Figure 1 are plugged into the equation, calculating the dot product for these two vectors can be quickly done, as shown in the following equation:

a • b = 8 × 10 × cos(70 degrees)
a • b = 8 × 10 × 0.342
a • b = 27.36

The angle's cosine has been rounded down to three decimal places, so the final product (27.36) is only an approximation, although it's a close one.

If the magnitude of two vectors and the angle between them is not known, use the following formula to calculate the dot product:

a • b = (ax × bx) + (ay × by)

Two vectors (a and b) with lengths on a two-dimensional Cartesian plane
Figure 2. Diagram adding vector lengths, as they're reflected on each axis, to Figure 1.

In this case, multiply the vector lengths as they're projected onto the x-axis and y-axis of the Cartesian plane. To better understand how this works, consider Figure 2, which has been updated from Figure 1 to include the vector lengths, as they're reflected on each axis.

Vector a measures -3.4 on the x-axis and 7.3 on the y-axis. (These numbers have been rounded down to one decimal point.) Vector b measures 7.1 on the x-axis and 7.1 on the y-axis. For this vector, the measurements are the same on each axis because the vector is at a 45-degree angle. These amounts can be plugged into the following new formula:

a • b = (ax × bx) + (ay × by)
a • b = (-3.4 × 7.1) + (7.3 × 7.1)
a • b = -24.12 + 51.83
a • b = 27.71

Because the numbers have been rounded, the final figure differs slightly from the previous one (27.36), but they're close enough to demonstrate how the two different methods can be used to calculate the dot product for a pair of vectors.

A similar approach can be used to calculate the dot product for vectors in a three-dimensional space. For this, modify the formula as follows to incorporate the third dimension (represented by the z-axis):

a • b = (ax × bx) + (ay × by) + (az × bz)

The formula now includes the z-axis in its calculations, but the original components remain the same. To test out the updated formula, assume that both vectors measure 5 on the z-axis. The calculations would now look as follows:

a • b = -(3.4 × 7.1) + (7.3 × 7.1) + (5 x 5)
a • b = -24.12 + 51.83 + 25
a • b = 52.71

Not surprisingly, the dot product is 52.71, which is 25 more than the 27.71 in the previous calculation. The 25 is the result of adding the az × bz component (5 x 5) to the equation to incorporate the three-dimensional space.

The dot product is used in fields such as physics, mathematics and other areas in ways that have practical application to the real world. For example, the dot product can be used when installing a solar panel on a roof. By comparing the sun's angle to the panel's angle, engineers can calculate the best positioning for the panel to maximize the amount of solar energy being absorbed throughout the day.

See also: Mathematical symbols

This was last updated in October 2022

Continue Reading About dot product (scalar product)

Networking
  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

  • private 5G

    Private 5G is a wireless network technology that delivers 5G cellular connectivity for private network use cases.

  • NFVi (network functions virtualization infrastructure)

    NFVi (network functions virtualization infrastructure) encompasses all of the networking hardware and software needed to support ...

Security
  • virus (computer virus)

    A computer virus is a type of malware that attaches itself to a program or file. A virus can replicate and spread across an ...

  • Certified Information Security Manager (CISM)

    Certified Information Security Manager (CISM) is an advanced certification that indicates that an individual possesses the ...

  • cryptography

    Cryptography is a method of protecting information and communications using codes, so that only those for whom the information is...

CIO
  • B2B (business to business)

    B2B (business-to-business) is a type of commerce involving the exchange of products, services or information between businesses, ...

  • return on investment (ROI)

    Return on investment (ROI) is a crucial financial metric investors and businesses use to evaluate an investment's efficiency or ...

  • big data as a service (BDaaS)

    Big data as a service (BDaS) is the delivery of data platforms and tools by a cloud provider to help organizations process, ...

HRSoftware
  • talent acquisition

    Talent acquisition is the strategic process an organization uses to identify, recruit and hire the people it needs to achieve its...

  • human capital management (HCM)

    Human capital management (HCM) is a comprehensive set of practices and tools used for recruiting, managing and developing ...

  • Betterworks

    Betterworks is performance management software that helps workforces and organizations to improve manager effectiveness and ...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...

Close