concept scalar multiple in category python

appears as: scalar multiple, scalar multiples, scalar multiple, scalar multiples
Math for Programmers: 3D graphics, machine learning, and simulations with Python MEAP V11

This is an excerpt from Manning's book Math for Programmers: 3D graphics, machine learning, and simulations with Python MEAP V11.

The result on the vector components is that each component is scaled by the same factor. You can picture scalar multiplication as changing the size of the right triangle defined by a vector and its components, but not affecting its aspect ratio. Figure 2.18 superimposes a vector v and its scalar multiple 1.5 ∙ v, where the scalar multiple is 1.5 times as long. Its components are also 1.5 times the length of the original components of v.

Figure 2.18: Scalar multiplication of a vector scales both components by the same factor.

In coordinates, the scalar multiple of 1.5 times the vector v = (6, 4) gives us a new vector (9, 6), where each component is 1.5 times its original value. Computationally, we execute any scalar multiplication on a vector by multiplying each coordinate of the vector by the scalar. As a second example, scaling a vector w = (1.2, -3.1) by a factor 6.5 can be accomplished like this:

Exercise 5.5: In either 2D or 3D, there is a boring but important vector transformation called the identity transformation that takes in a vector and returns the same vector as output. This transformation is linear because it takes any input vector sum, scalar multiple, or linear combination and returns the same thing as output. What are the matrices representing the identity transformation in 2D and 3D, respectively?

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest