dot

Dot product.

📝 Syntax

  • R = dot(A, B)

  • R = dot(A, B, dim)

📥 Input argument

  • A, B - numeric arrays.

  • dim - positive integer scalar: Dimension to operate along.

📤 Output argument

  • R - Scalar Dot Product.

📄 Description

R = dot(A, B) returns the scalar dot product ofA and B.

For real vectors a\mathbf{a}

and b\mathbf{b}

of length nn

: ab=i=1naibi=a1b1+a2b2++anbn\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} a_i b_i = a_1 b_1 + a_2 b_2 + \cdots + a_n b_n

For complex vectors, the dot product is: ab=i=1naibi\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} \overline{a_i} b_i

where ai\overline{a_i}

denotes the complex conjugate of aia_i

📚 Bibliography

https://en.wikipedia.org/wiki/Dot_product

💡 Example

🔗 See also

conj.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?