IB Maths Help logoIB Maths Help

Magnitude, dot product and angle between vectors

Find the length of a vector, the dot product of two vectors and the angle between them, with the exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, plus what to write in the exam.

Used inAA HLAI HL

To find the angle between two vectors, store them, then work out cos⁡θ=a⋅b|a||b|\cos\theta = \dfrac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}||\mathbf{b}|} and take the inverse cosine. The Casio and TI-Nspire calculators have commands for the dot product (DotP or dotP) and the magnitude (Norm or norm); the TI-84 Plus CE does the same with lists and sum(. Set the angle mode to degrees first if you want the angle in degrees.

Example

The vectors a=(2−13)\mathbf{a} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} and b=(40−2)\mathbf{b} = \begin{pmatrix} 4 \\ 0 \\ -2 \end{pmatrix} are given. Find a⋅b\mathbf{a} \cdot \mathbf{b}, |a||\mathbf{a}|, |b||\mathbf{b}|, and the angle between a\mathbf{a} and b\mathbf{b} in degrees. Give the angle to 3 significant figures.

The dot product is 2(4)+(−1)(0)+3(−2)=22(4) + (-1)(0) + 3(-2) = 2. The magnitudes are |a|=14=3.74|\mathbf{a}| = \sqrt{14} = 3.74 and |b|=20=4.47|\mathbf{b}| = \sqrt{20} = 4.47. Then cos⁡θ=21420\cos\theta = \dfrac{2}{\sqrt{14}\sqrt{20}}, so θ=83.1∘\theta = 83.1^\circ. The dot product is small compared with the magnitudes, so the vectors are close to perpendicular.

Choose your calculator

How to find the magnitude, dot product and angle between vectors on a TI-84 Plus CE

Store each vector as a list

The TI-84 Plus CE has no vector commands, so a vector is a list of its components. For a=(2,−1,3)\mathbf{a} = (2, -1, 3) press 2nd ( ({) 2 , (−) 1 , 3 2nd ) (}) sto▶ 2nd 1 (L1) enter.

Do the same for b=(4,0,−2)\mathbf{b} = (4, 0, -2), storing it in L2 (2nd 2). Both lists must have the same number of entries.

{2,-1,3}→L1
{4,0,-2}→L2

Dot product

Press 2nd stat (LIST), move to MATH with ▶, and choose 5:sum(. Then press 2nd 1 × 2nd 2 ) enter. This multiplies the two lists term by term and adds the products.

a⋅b=2\mathbf{a} \cdot \mathbf{b} = 2.

sum(L1*L2)
2

Magnitude

Press 2nd x² (√), then 2nd stat (LIST), MATH, 5:sum(, then 2nd 1 x² ) ) enter. This is 22+(−1)2+32\sqrt{2^2 + (-1)^2 + 3^2}. Repeat with 2nd 2 for b\mathbf{b}.

|a|=3.74|\mathbf{a}| = 3.74 and |b|=4.47|\mathbf{b}| = 4.47 to 3 significant figures.

√(sum(L1²))
3.741657387
√(sum(L2²))
4.472135955

Angle between the vectors

Check the angle mode first (see switching between degrees and radians): use degree mode for an answer in degrees. Press 2nd cos (cos⁻¹) and type the dot product divided by the product of the magnitudes: sum(L1*L2) ÷ ( √(sum(L1²)) × √(sum(L2²)) ) ), using the same keys as above. Press enter.

θ=83.1∘\theta = 83.1^\circ to 1 decimal place.

cos⁻¹(sum(L1*L2)/(√(sum(
L1²))*√(sum(L2²))))
83.13543366

Cross product

The cross product of a\mathbf{a} and b\mathbf{b} is a vector at right angles to both. Its components are (a2b3−a3b2, a3b1−a1b3, a1b2−a2b1)\left(a_2b_3 - a_3b_2,\ a_3b_1 - a_1b_3,\ a_1b_2 - a_2b_1\right).

The TI-84 Plus CE has no cross product command, so type each component from list entries. For the first component press 2nd 1 ( 2 ) × 2nd 2 ( 3 ) − 2nd 1 ( 3 ) × 2nd 2 ( 2 ) enter. This is L1(2)*L2(3)-L1(3)*L2(2), where L1(2) is the second entry of L1. Use L1(3)*L2(1)-L1(1)*L2(3) for the second component and L1(1)*L2(2)-L1(2)*L2(1) for the third.

L1(2)*L2(3)-L1(3)*L2(2)
2

For the magnitude, store the three components as a list: press 2nd ( ({), type the three expressions above separated by ,, then 2nd ) (}) sto▶ 2nd 3 (L3) enter. Then press 2nd x² (√), 2nd stat (LIST), MATH, 5:sum(, 2nd 3 x² ) ) enter.

a×b=(2,16,4)\mathbf{a} \times \mathbf{b} = (2, 16, 4) and its magnitude is 16.616.6 to 3 significant figures.

√(sum(L3²))
16.61324773

Press 2nd enter (ENTRY) to bring back the last line and edit it, so you do not retype the long angle expression for new vectors.

How to find the magnitude, dot product and angle between vectors on a Casio fx-CG50

Store each vector

Press MENU and choose Run-Matrix. Type the vector in double square brackets: press SHIFT + ([) twice, type 2 , (−) 1 , 3, then SHIFT − (]) twice.

Press →, then OPTN F2 (MAT/VCT), then F6 (▶) twice to reach the vector commands, and F1 (Vct). Press ALPHA X,θ,T (A) and EXE. Repeat for b=(4,0,−2)\mathbf{b} = (4, 0, -2), storing it in Vct B with ALPHA then the key marked B. Both vectors must have the same number of entries.

[[2,-1,3]]→Vct A
[[4,0,-2]]→Vct B

Dot product

Press OPTN F2 (MAT/VCT), F6 (▶) twice, then F2 (DotP). Press F1 (Vct) ALPHA X,θ,T (A) , F1 (Vct) then Vct B, ) and EXE.

a⋅b=2\mathbf{a} \cdot \mathbf{b} = 2.

DotP(Vct A,Vct B)
2

Magnitude

Press OPTN F2 (MAT/VCT), F6 (▶) three times, then F1 (Norm). Press F6 (▶) three times to come back to the vector commands, then F1 (Vct) ALPHA X,θ,T (A) ) EXE. In the usual Math display the answer is exact, so press S↔D for the decimal. Repeat for Vct B.

|a|=14=3.74|\mathbf{a}| = \sqrt{14} = 3.74 and |b|=20=4.47|\mathbf{b}| = \sqrt{20} = 4.47 to 3 significant figures.

Norm(Vct A)
√14
3.741657387
Norm(Vct B)
2√5
4.472135955

Angle between the vectors

Check the angle setting first (see switching between degrees and radians): use Deg for an answer in degrees. Press OPTN F2 (MAT/VCT), F6 (▶) twice, then F4 (Angle). Press F1 (Vct) ALPHA X,θ,T (A) , F1 (Vct) then Vct B, ) and EXE.

θ=83.1∘\theta = 83.1^\circ to 1 decimal place.

Angle(Vct A,Vct B)
83.13543366

Cross product

The cross product of a\mathbf{a} and b\mathbf{b} is a vector at right angles to both. Its components are (a2b3−a3b2, a3b1−a1b3, a1b2−a2b1)\left(a_2b_3 - a_3b_2,\ a_3b_1 - a_1b_3,\ a_1b_2 - a_2b_1\right).

Press OPTN F2 (MAT/VCT), F6 (▶) twice, then F3 (CrossP). Press F1 (Vct) ALPHA X,θ,T (A) , F1 (Vct) then Vct B, ) and EXE. The result is a vector: its first, second and third entries are the three components. The two vectors must have 3 entries each.

For the magnitude, press OPTN F2 (MAT/VCT), F6 (▶) three times, then F1 (Norm). Press F6 (▶) until the page with DotP and CrossP shows, then F3 (CrossP), enter the two vectors as above, ) ) and EXE. Press S↔D for the decimal.

a×b=(2,16,4)\mathbf{a} \times \mathbf{b} = (2, 16, 4) and its magnitude is 16.616.6 to 3 significant figures.

CrossP(Vct A,Vct B)
[2 16 4]
Norm(CrossP(Vct A,Vct B))
16.61324773

The same angle comes from the formula cos⁡θ=a⋅b|a||b|\cos\theta = \dfrac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}||\mathbf{b}|}: type SHIFT cos (cos⁻¹), then the DotP, divided by the two Norm values multiplied together. Use it to check the Angle command.

The vector commands are spread over three screens of the MAT/VCT menu. Press F6 (the arrow) to move to the next screen, and look at the labels along the bottom to see where you are.

How to find the magnitude, dot product and angle between vectors on a Casio fx-CG100

Store each vector

Press HOME and choose Calculate. While the Calculation tab is showing, press ▶ to open the Vector tab, which lists Vct A to Vct Z.

Highlight Vct A, press TOOLS and choose Dimension. Enter 1 row and 3 columns, then OK. Type the entries 2 EXE (−) 1 EXE 3 EXE, then go back to the Vector list. Repeat for b=(4,0,−2)\mathbf{b} = (4, 0, -2) in Vct B. Both vectors must have the same dimensions.

Vct A: [2 -1 3]
Vct B: [4 0 -2]

Dot product

Go back to the Calculation tab. Press CATALOG and choose Vector → DotP(. Press CATALOG, Vector, Vct and ALPHA then the key marked A; type ,; do the same for Vct B; then ) and EXE.

a⋅b=2\mathbf{a} \cdot \mathbf{b} = 2.

DotP(Vct A,Vct B)
2

Magnitude

Press CATALOG and choose Vector → Norm(, then Vct with ALPHA and the key marked A, ) and EXE. Repeat for Vct B. The answer may appear as a root, such as 14\sqrt{14}: the FORMAT key toggles it to a decimal.

|a|=3.74|\mathbf{a}| = 3.74 and |b|=4.47|\mathbf{b}| = 4.47 to 3 significant figures.

Norm(Vct A)
3.741657387
Norm(Vct B)
4.472135955

Angle between the vectors

Check the Angle setting first (see switching between degrees and radians): the answer comes back in the unit that is set. Press CATALOG and choose Vector → Angle(, then Vct A, , Vct B, ) and EXE.

θ=83.1∘\theta = 83.1^\circ to 1 decimal place.

Angle(Vct A,Vct B)
83.13543366

Cross product

The cross product of a\mathbf{a} and b\mathbf{b} is a vector at right angles to both. Its components are (a2b3−a3b2, a3b1−a1b3, a1b2−a2b1)\left(a_2b_3 - a_3b_2,\ a_3b_1 - a_1b_3,\ a_1b_2 - a_2b_1\right).

Press CATALOG and choose Vector → CrossP(. Press CATALOG, Vector, Vct and ALPHA then the key marked A; type ,; do the same for Vct B; then ) and EXE. The result is a vector: its first, second and third entries are the three components.

For the magnitude, press CATALOG and choose Vector → Norm(, enter the CrossP( command above inside it, and close with ) ) and EXE.

a×b=(2,16,4)\mathbf{a} \times \mathbf{b} = (2, 16, 4) and its magnitude is 16.616.6 to 3 significant figures.

CrossP(Vct A,Vct B)
[2 16 4]
Norm(CrossP(Vct A,Vct B))
16.61324773

You can also type a vector straight into DotP(, Norm( or Angle( with TOOLS then the m×n template, which saves storing it first when you need a result only once.

How to find the magnitude, dot product and angle between vectors on a TI-Nspire CX

Store each vector

On a Calculator page press template and choose the matrix template. Give it 1 row and 3 columns, then type the entries 22, −1-1, 33 with tab between the boxes. You can also type the vector in square brackets with commas between the entries, such as [2,-1,3].

Press ctrl var (sto▶), type the name a and press enter. Do the same for b=(4,0,−2)\mathbf{b} = (4, 0, -2), storing it as b. The two vectors must both be rows or both be columns of the same length.

[2 -1 3]→a
[4 0 -2]→b

Dot product

Type dotP(a,b) and press enter.

a⋅b=2\mathbf{a} \cdot \mathbf{b} = 2.

dotP(a,b)
2

Magnitude

Type norm(a) and press enter, then norm(b) and press enter.

|a|=3.74|\mathbf{a}| = 3.74 and |b|=4.47|\mathbf{b}| = 4.47 to 3 significant figures.

norm(a)
3.74165738677
norm(b)
4.472135955

Angle between the vectors

Check the angle setting first (see switching between degrees and radians): the answer comes back in the unit set in Document Settings. Press trig and choose cos⁻¹, then type dotP(a,b)/(norm(a)*norm(b))) and press enter.

θ=83.1∘\theta = 83.1^\circ to 1 decimal place.

cos⁻¹(dotP(a,b)/(norm(a)*norm(b)))
83.1354336623

Cross product

The cross product of a\mathbf{a} and b\mathbf{b} is a vector at right angles to both. Its components are (a2b3−a3b2, a3b1−a1b3, a1b2−a2b1)\left(a_2b_3 - a_3b_2,\ a_3b_1 - a_1b_3,\ a_1b_2 - a_2b_1\right).

Type crossP(a,b) and press enter. The result is a row vector whose entries are the three components. For the magnitude type norm(crossP(a,b)) and press enter. Both vectors must be rows (or both columns) with 3 entries.

a×b=(2,16,4)\mathbf{a} \times \mathbf{b} = (2, 16, 4) and its magnitude is 16.616.6 to 3 significant figures.

crossP(a,b)
[2 16 4]
norm(crossP(a,b))
16.6132477258

Store the vectors as a and b once, and the same three commands work for every part of the question: only the stored vectors change.

Sources. Key presses follow the manufacturers' documentation: the TI-84 Plus CE eGuide, the TI-Nspire eGuide, the Casio fx-CG50 Software User's Guide (version 3.30) and the Casio fx-CG100 online manual.

What to write in the exam

  • Write the formula and the values. Show a⋅b\mathbf{a} \cdot \mathbf{b} as the sum of the products of the components, the two magnitudes, and cos⁡θ=a⋅b|a||b|\cos\theta = \dfrac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}||\mathbf{b}|}. Do not write key presses.
  • Show the dot product step. Writing 2(4)+(−1)(0)+3(−2)2(4) + (-1)(0) + 3(-2) earns the method mark even if the calculator then does the arithmetic.
  • Give the angle in the unit the question uses. Degrees need the calculator in degree mode, and radians need radian mode. Write the unit.
  • Use the dot product to test for perpendicular vectors. If a⋅b=0\mathbf{a} \cdot \mathbf{b} = 0 the vectors are perpendicular and the angle is 90∘90^\circ; a negative dot product means an obtuse angle.
  • Check which papers allow a calculator. In AA HL, Paper 1 is calculator-free, so work from the components by hand there. In AI HL a calculator is allowed on every paper (check your syllabus).

Other vector commands

The cross product has its own step in each calculator section above. The Casio calculators also have UnitV for a unit vector, and the TI-Nspire has unitV. To work with vectors as matrices, see matrix operations and solving systems.

Error messages and what to do

CalculatorMessageUsual causeWhat to try
TI-84 Plus CEERR:DIMENSION MISMATCHThe two lists have a different number of entries, so L1*L2 cannot be worked out.Check that both vectors have the same number of components, then store them again.
Casio fx-CG50Dimension ERRORThe two vectors have different dimensions, or one is a row and the other a column.Store both vectors with the same number of rows and columns.
Casio fx-CG100Dimension ERRORThe two vectors have different dimensions.Set the same dimensions for both vectors in the Vector tab.
TI-Nspire CXDimension mismatchThe two vectors have different dimensions, or one is a row and the other a column.Enter both as rows of the same length, or both as columns.

Common mistakes

  • Unequal vectors. The dot product needs both vectors to have the same number of components, and on the Nspire and Casio calculators both must be rows or both columns. A dimension error means they do not match.
  • Reading the angle in the wrong unit. A result of about 1.451.45 is the same angle as 83.1∘83.1^\circ in radians. Set the mode to match the question before you calculate.
  • Forgetting the brackets in the denominator. The angle formula divides by the product |a||b||\mathbf{a}||\mathbf{b}|, so both magnitudes go inside one pair of brackets.
  • Rounding before the end. Keep the full dot product and magnitudes, and round only the angle.
  • Writing key presses as working. Write the formula and the values. The examiner needs the method, not the keys.

Try it yourself

Real questions from the IB Maths Help question bank. Type your answer and press Mark it: the worked solution and mark scheme then appear. Use your calculator for the dot product, the magnitudes and the angle.

Practise with your calculator

Choose your course to see the practice sets that use this skill. You can also try practice mode or browse every GDC guide.

Quick questions

How do I find the angle between two vectors on a calculator?

Store the two vectors, find their dot product and magnitudes, then take the inverse cosine of the dot product divided by the product of the magnitudes. The Casio calculators also have an Angle command that does this in one step. Make sure the angle mode matches the unit you want.

How do I find the dot product on a TI-84 Plus CE?

The TI-84 Plus CE has no vector commands. Store the components of each vector in a list and use sum( from the LIST MATH menu: sum(L1*L2) multiplies the lists term by term and adds the results.

How do I find the magnitude of a vector?

Use Norm on the Casio calculators and norm on the TI-Nspire. On the TI-84 Plus CE, use the square root of sum(L1^2). The magnitude is the square root of the sum of the squares of the components.

Why does my angle answer look strange?

Check the angle mode. A calculator in radian mode gives the angle in radians, so an angle of about 83.1 degrees appears as about 1.45. Switch the mode to degrees if the question asks for degrees.