Home page for accesible maths 1 Matrices

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

1.3. Vector multiplication

There is an obvious way of adding two vectors to get another vector, and an obvious way of multiplying a vector by a scalar. Below we define a multiplication which has two vectors as its input, and its output is a scalar. We also define a multiplication which has a matrix and a vector as its input, and a vector as its output.

Definition 1.3.1.

Let v=(v1v2⋮vm)∈ℝm,w=(w1w2⋮wm)∈ℝm, and A∈Mn×m⁡(ℝ).

  1. (i)

    (Vector × vector) The scalar product (also dot product) of v and w is the real number

    v⋅w=v1⁢w1+v2⁢w2+…+vm⁢wm=∑1≤i≤mvi⁢wi∈ℝ.

    The symbol Σ1≤i≤m means “sum over all values of i such that 1≤i≤m”.

  2. (ii)

    (Matrix × vector) The product A⁢v is defined to be the column vector (vi′)∈ℝn, with coefficients

    vi′=ai⁢1⁢v1+ai⁢2⁢v2+…+ai⁢m⁢vm=∑1≤j≤mai⁢j⁢vj for all 1≤i≤n.

    In other words, the i-th coefficient of the column vector A⁢v is the scalar product of the i-th row of A with v.

Example 1.3.2.

  • Let A=(12-2101)∈M3×2⁡(ℝ) and v=(3-1)∈ℝ2. The product A⁢v is defined and we have

    A⁢v=(1⋅3+2⋅(-1)-2⋅3+1⋅(-1)0⋅3+1⋅(-1))=(1-7-1)∈ℝ3,v⋅v=3⋅3+(-1)⁢(-1)=10.

Example 1.3.3.

  • Let A=(123456)∈M2×3⁡(ℝ) and v=(1-12)∈ℝ3. Then

    A⁢v=(511)∈ℝ2,v⋅v=6.
Remark 1.3.4.
  1. (i)

    The multiplication of a matrix with a column vector is defined if and only if the size of the vector is equal to the number of columns of the matrix.

  2. (ii)

    The terms “scalar product” and “scalar multiplication” refer to completely different things.

Definition 1.3.5 (Length of a vector).

The length (or norm) of a vector v∈ℝm is

||v||=v12+⋯+vm2=v⋅v.
Proposition 1.3.6.

If the angle between two vectors v,w∈Rm is called θ∈[0,π), then

v⋅w=∥v∥⁢∥w∥⁢cos⁡θ.

In particular v and w are perpendicular to each other if and only if v⋅w=0.

Proof.

We omit the proof. ∎

Example 1.3.7.

  • Find the angle θ between the vectors

    v=(102-2) and w=(-2101) both in ℝ4. 

    Solution: We compute the scalar product and lengths of v and w:

    v⋅w=1⋅(-2)+0⋅1+2⋅0+(-2)⋅1=-4,
    ∥v∥=12+02+22+22=3 and ∥w∥=(-2)2+12+02+12=6.

    By Proposition 1.3.6, cos⁡θ=-43⁢6. Hence the angle between v and w is about 2.15 radians (or 123 degrees).

Example 1.3.8. (Differential operator)

  • Consider a degree n poynomial

    P=a1⁢xn+a2⁢xn-1+⋯+an⁢x+an+1.

    We may represent P as an (n+1)-dimensional column vector, v=(ai), simply by recording the coefficients. Then differentiating this polynomial with respect to x is the same as applying the Differential operator:

    Dx=(0n00n-10⋱⋱0200010)∈M(n+1)×(n+1)⁡(ℝ).

    For example, when n=2, the differential operator is Dx=(000200010). So if v represents the polynomial x2+3⁢x+4, then one calculates

    Dx⋅v=Dx⋅(134)=(023),

    which represents the polynomial 2⁢x+3, as one would expect from calculus.