Dot product of row and column vectors

Prerequisites

Matrices Show

Matrix Transposition Show

Row And Column Vectors Show

Dot product of row and column vectors

Introduction

  • The dot product is a method of multiplying two vectors and receiving a number as the result.
  • The first vector must be a row vector, while the second must be a column vector.
  • Both vectors must contain the same amount of elements.
  • To calculate the vector inner product, multiply the corresponding elements and sum the results.

Mathematical Definition

a and b are column vectors.

Example

code (Python)

import numpy as np

a = [3, 6, 2]
b = [1, 3, 8]

c = np.dot(a, b)
print(c)

Notes

  • It is also known as the scalar product and vector inner product.