Vectors and matrices
DRT 111 Applied Mathematics for Technology
Lesson
By the end of this module you will be able to
- Distinguish scalars from vectors and write vectors in component form
- Add velocity vectors to find ground velocity in wind
- Use the dot product to find angles between vectors and components along a direction
- Use the cross product to find the moment produced by propeller thrust
- Multiply matrices, find determinants and solve 2×2 linear systems
Quantities with size and direction
Saying “the wind is 5 m/s” is not enough, because a headwind and a tailwind affect a drone in opposite ways. A quantity that needs both a magnitude and a direction is a vector. A quantity described by magnitude alone, such as mass, temperature or time, is a scalar.
In drone work, velocity, acceleration, force, wind and position are all vectors, so every autopilot computes with vectors and matrices constantly. This module lays the groundwork for Module 4 and for control systems in DRT 226.
Vectors in component form
Vectors are written in bold or with an arrow, or , and in component form along each axis. In the north-east-down (NED) frame, explained fully in Module 4, a drone’s velocity is
Its magnitude comes from Pythagoras’ theorem in three dimensions:
A unit vector has magnitude 1 and indicates direction only. Divide a vector by its own magnitude to get one: .
Adding vectors: airspeed and wind
A drone moves through the air with air velocity , while the air itself moves with wind velocity . The drone’s velocity relative to the ground is the sum:
Add vectors by adding matching components, or draw them head to tail as in Figure 1.
Example 1. Crosswind pushes the track aside
A drone points north and flies at 12 m/s through the air. The wind blows towards the east at 5 m/s (N and E axes only).
- Ground speed m/s
- Actual direction of travel (track)
Although the nose points north, the drone actually moves east of north. The autopilot must turn slightly into the wind to stay on the planned path.
Multiplying a vector by a scalar multiplies every component by that number. points the same way but is twice as long.
The dot product
The dot product of two vectors is a scalar. It can be computed in two equivalent ways:
where is the angle between the vectors. The dot product therefore has two uses:
- Finding the angle between vectors:
- Finding a component along a direction: if is a unit vector along the flight path, is the part of the wind along the path. This matches from Module 2.
If the dot product is zero, the two vectors are perpendicular.
Example 2. Angle between vectors
and
The cross product and moments
The cross product works on three-dimensional vectors and gives a vector perpendicular to both:
In drones, the cross product gives the moment (torque) that makes the aircraft rotate. If force acts at position from the centre of gravity, the moment is .
Example 3. The front motor speeds up
Use the forward-right-down (FRD) body frame. A motor at the front, m, produces 10 N of upward thrust. Because the D axis points down, upward force is N.
The 2.5 N·m moment about the right (y) axis is positive, which by the right-hand rule means nose up. That is exactly what happens when the front motors spin faster than the rear ones.
Matrices
A matrix is a table of numbers arranged in rows and columns. An matrix has rows and columns. A vector in component form is simply a matrix with one column.
Matrix multiplication
An matrix times an matrix gives an result. The number of columns of must equal the number of rows of . Each entry of the result is a row of multiplied pairwise with a column of and summed.
Key idea
Matrix multiplication is not commutative: in general . This matters greatly in Module 4, because rotating in yaw then pitch gives a different result from pitch then yaw.
Special matrices
- The identity matrix has 1s on the main diagonal and 0s elsewhere. Multiplying by leaves any matrix unchanged.
- The transpose swaps rows and columns.
- The inverse satisfies . It exists only when the determinant is not zero.
Determinants and linear systems
For a matrix:
A system of linear equations can be written as and solved as .
Example 4. Sharing current between motors
Two motor groups draw 10 A in total, and the first draws twice the current of the second minus 2 A. Let and be the currents of the first and second groups.
The first group draws 6 A and the second 4 A. Check: and .
Common mistakes
Watch out
- Adding magnitudes instead of vectors. A 5 m/s wind plus a 12 m/s airspeed does not always give 17 m/s; it depends on direction.
- Multiplying matrices in the wrong order. and differ.
- Multiplying matrices of incompatible size. Columns of the first must equal rows of the second.
- Forgetting that D points down. Upward force in NED or FRD is negative.
Summary
- Vectors have magnitude and direction, are written as components, and their magnitude comes from Pythagoras.
- Ground velocity is air velocity plus the wind vector.
- The dot product gives a scalar for angles and components; the cross product gives a vector for moments.
- Matrix multiplication is row times column and is not commutative.
- Linear systems are written and solved with the inverse.
Check your understanding
- Find the magnitude of .
- A drone’s air velocity is m/s in N, E and the wind is m/s. What is its ground velocity?
- Are and perpendicular?
- Compute .
- Find the determinant of .
Answers
- , magnitude m/s
- , so yes, they are perpendicular
Key formulas
| Vector magnitude | |
| Ground velocity | |
| Dot product | |
| Moment | |
| 2×2 determinant | |
| 2×2 inverse |
Key references
- Strang, G. (2016). Introduction to linear algebra (5th ed.). Wellesley-Cambridge Press. link
- Kreyszig, E. (2011). Advanced engineering mathematics (10th ed.). Wiley.
- Stroud, K. A., & Booth, D. J. (2020). Engineering mathematics (8th ed.). Bloomsbury.
- Beard, R. W., & McLain, T. W. (2012). Small unmanned aircraft: Theory and practice. Princeton University Press.
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Lecture, case discussion and in-class problem solving
Learning evidence: Quiz results and submitted exercises