I recently prepared a worksheet to teach vector fundamentals in one of my classes, and I wanted to share it with you all. It's nothing special, but I found Maple really helpful in demonstrating the concepts visually. Below is a breakdown of what the worksheet covers, with some Maple code examples included.

Feel free to take a look and use it if you find it useful! Any feedback or suggestions on how to improve it would be appreciated.

restart

NULL

v := `<|>`(`<,>`(2, 3)); w := `<|>`(`<,>`(4, 1))

Matrix(%id = 36893488152076804092)

(1)

Basic Vector Operations

• 

Addition and Subtraction

 

We  can add and subtract vectors easily if they are of the same dimension.

NULL

u_add := v+w; u_sub := v-w

Matrix(%id = 36893488152076803596)

(2)

NULL

NULL

Typesetting[delayDotProduct]((((Triangle(L)*a*w*o*f*A*d*d)*i*t*i)*o*n*o)*f, Vector(s), true)

"The famous triangle law can be used for the addition of vectors and this method is also called the head-to-tail method,As per this law,two vectors can be added together by placing them together in such away that the first vector's head joins the tail of the second vector. Thus,by joining the first vector's tail to the head of the second vector,we can obtain the resultant vector sum."

NULL

with(plots); display(arrow([0, 0], [2, 3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([2, 3], [4, 1], color = green, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [6, 4], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "
Triangle Law of Addition of Vectors", titlefont = [times, 20, bold])

 

NULL

NULL

Parallelogram Law of Addition of Vectors

"An other law that can be used for the addition of vectors is the parallelogram law of the addition of vectors*Let's take two vectors v and u,as shown below*They form the two adjacent sides of aparallelogram in their magnitude and direction*The sum v+u is represented in magnitude and direction by the diagonal of the parallelogram through thei rcommon point."

NULL

display(arrow([0, 0], [2, 3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [6, 4], color = green, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [4, 1], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "

Parallelogram Law of Addition of Vectors", titlefont = [times, 20, bold])

 

NULL

NULL

NULL

NULL

NULL

NULL

NULL

• 

Scalar Multiplication

We can multiply a vector by a scalar. To multiply a vector by a scalar (a constant), multiply each of its components by the constant.

Suppose we let the letter  λ represent a real number and  u = (x,y) be the vector

v_scaled := 3*v

Matrix(%id = 36893488152152005076)

(3)

NULL

NULL

• 

-Define*the*opposite*vector*v

Error, (in LinearAlgebra:-Multiply) invalid arguments

 

Two vectors are opposite if they have the same magnitude but opposite direction.

v_opposite := -v; vec1 := arrow([0, 0], [2, 3], color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); vec2 := arrow([0, 0], [-2, -3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); display([vec1, vec2], scaling = constrained, title = "Original Vector and its Opposite (-v)")

 
• 

Dot Product

Sometimes the dot product is called the scalar product. The dot product is also an example of an inner product and so on occasion you may hear it called an inner product.

Given the two vectors  `#mover(mi("a"),mo("&rarr;"))` = (x__1, y__1) and `#mover(mi("b"),mo("&rarr;"))` = (x__2, y__2)
 the dot product is, `#mover(mi("a"),mo("&rarr;"))`.`#mover(mi("b"),mo("&rarr;"))` = x__1*x__2+y__1*y__2

`#mover(mi("a"),mo("&rarr;"))`.`#mover(mi("b"),mo("&rarr;"))` = x__1*x__2+y__1*y__2

(4)

`#mover(mi("a"),mo("&rarr;"))` := `<|>`(`<,>`(5, -8))

Matrix(%id = 36893488152255219820)

(5)

`#mover(mi("b"),mo("&rarr;"))` := `<|>`(`<,>`(1, 2))

Matrix(%id = 36893488152255215244)

(6)


display(arrow([0, 0], [5, -8], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [1, 2], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y])

 

 

 

 

 

 

 

 

 

 

 

  with(LinearAlgebra)

dot_product := DotProduct(`#mover(mi("a"),mo("&rarr;"))`, `#mover(mi("b"),mo("&rarr;"))`)

-11

(7)
• 

Vector Norm (Magnitude)

To find the magnitude (or length) of a vector, use Norm.

norm_a := Norm(`#mover(mi("a"),mo("&rarr;"))`, 2); norm_b := Norm(`#mover(mi("b"),mo("&rarr;"))`, 2)

5^(1/2)

(8)
• 

Calculate the Cosine Between Two Vectors

cos_theta := dot_product/(norm_a*norm_b)

-(11/445)*89^(1/2)*5^(1/2)

(9)

angle_radians := arccos(cos_theta)

Pi-arccos((11/445)*89^(1/2)*5^(1/2))

(10)

angle_degrees := evalf(convert(angle_radians, degrees))

121.4295656*degrees

(11)

NULL

We can determine whether two vectors are parallel by using the scalar multiple method or the determinant (area of the parallelogram formed by the vectors) method.

``

• 

Scalar Multiple Method

a := Vector([5, -8]); b := Vector([10, -16]); k := a[1]/b[1]; is_parallel := a[2]/b[2] = k

1/2 = 1/2

(12)
• 

Determinant Method

determinant := a[1]*b[2]-a[2]*b[1]; result := determinant = 0

0 = 0

(13)

 

 

display(arrow([0, 0], [5, -8], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [10, -16], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "Parallel Vectors")

 

 

 

 

Two vectors a and b are perpendicular (vertical)

NULL

• 

if and only if their dot product is zero

a1 := Vector([1, 2]); b1 := Vector([-2, 1]); dot_product := DotProduct(a1, b1); is_perpendicular := dot_product = 0

0 = 0

(14)

display(arrow([0, 0], [-2, 1], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [1, 2], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "Perpendicular Vectors")

 
• 

Slope Method

slope_a := a1[2]/a1[1]; slope_b := b1[2]/b1[1]; is_perpendicular := slope_a*slope_b = -1

-1 = -1

(15)

NULL

• 

Special case: If one vector is vertical (undefined slope) and the other is horizontal (zero slope), they are perpendicular.

a2 := Vector([0, 3]); b2 := Vector([4, 0]); is_perpendicular := a2[1] = 0 and b2[2] = 0

true

(16)

vec1 := arrow([0, 0], [4, 0], color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); vec2 := arrow([0, 0], [0, 3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); display([vec1, vec2], scaling = constrained, title = "Perpendicular Vectors")

 

NULL

Download vectors.mw


Please Wait...