Dot product (dot)
Dot product of two vectors, or product of two matrices.
How to write it
dot(a, b)
- a
- A vector or a matrix. Takes a list, or a matrix, written as a list of rows.
- b
- A vector or a matrix. Takes a list, or a matrix, written as a list of rows.
Examples
dot([1, 2, 3], [4, 5, 6])In the solver,
Open in the solverdot([1, 2, 3], [4, 5, 6])gives32.dot([[1, 2], [3, 4]], [1, 1])In the solver,
Open in the solverdot([[1, 2], [3, 4]], [1, 1])gives[3, 7].
Related functions
- eigensystem
Eigenvalues and eigenvectors of a square matrix together: the values, then the vectors.
- diagonal_matrix
A matrix with the given list on its diagonal and zeros elsewhere.
- eigenvalues
Eigenvalues of a square matrix.
- diagonal
The diagonal of a matrix, as a list.
- eigenvectors
Eigenvectors of a square matrix, one for each eigenvalue.
- det
Determinant of a square matrix.