Vector Scaling

Vector Scaling

Introduction

  • Vectors can be scaled by numbers to produce new vectors.
  • To scale a vector by a number, you multiply each component of the vector by that number.
  • For example:

Mathematical Definition

Magnitude

  • The magnitude of a vector scales by the same amount as the individual components.
  • For example:
  • This leads to the identity:

code (Python)

import numpy as np

a = [3, 5]
b = np.multiply(a, 2)

print(b) # prints: [6 10]