- #1
tgt
- 522
- 2
Why not make dot(u,v)=transpose(u)v rather than transpose(v)u?
One way generates a scalar and the other way generates an NxN matrix. Which is which depends on whether the vector is a 1xN row vector or a Nx1 column vector.Hurkyl said:What's the difference?
D H said:One way generates a scalar and the other way generates an NxN matrix. Which is which depends on whether the vector is a 1xN row vector or a Nx1 column vector.Hurkyl said:What's the difference?
jostpuur said:At least difference emerges when transpose is replaced with Hermitian conjugate, when complex vectors are used.I see now.
No, you have misread. If u and v are column vectors (most common convention), then uTv is a scalar and uvT is a matrix.D H said:One way generates a scalar and the other way generates an NxN matrix. Which is which depends on whether the vector is a 1xN row vector or a Nx1 column vector.
The dot product, also known as the scalar product, is a mathematical operation that takes two vectors and produces a scalar value. It is calculated by multiplying the corresponding components of the vectors and adding them together. The result is a single number that represents the magnitude of the projection of one vector onto the other.
The dot product can be seen as a special case of matrix multiplication, where one of the vectors is considered as a 1xN matrix and the other as an Nx1 matrix. The result of the dot product is the same as the result of multiplying these two matrices and summing all the elements.
The dot product is an important tool in linear algebra as it allows us to calculate the angle between two vectors, determine whether they are orthogonal (perpendicular), and find the projection of one vector onto another. It is also used in calculations involving vector lengths, distances, and projections in higher dimensions.
Yes, the dot product can be applied to matrices of any size as long as the number of columns in the first matrix is equal to the number of rows in the second matrix. The resulting matrix will have the same number of rows as the first matrix and the same number of columns as the second matrix.
The dot product has various applications in fields such as physics, engineering, and computer science. It is used in calculating work and energy in physics, finding the similarity between documents in natural language processing, and determining the cosine similarity in recommendation systems. It is also used in computer graphics to calculate lighting and shading effects.