Vectors — AQA A-Level Computer Science
In AQA A-Level Computer Science, a vector is defined mathematically as an element of a vector space and computationally represented as a 1D array, list, or function mapping keys to real numbers. Mastering vector operations—including addition, scalar multiplication, dot product, and convex combinations—is essential for computer graphics, physics engines, and machine learning models.
Vectors explained
This statement uses the maps-to arrow to show a mapping from the input 3 to the output 2.718281828.
Read the full explanation
In this item, the arrow tells the learner that the value on the left is the input and the value on the right is the output produced by a rule or function. The number 2.718281828 is an approximation of Euler's number e, which is the base of natural logarithms. Learners should recognise that a mapping pair does not by itself reveal the rule; it simply records one input-output relationship. To use such pairs in computing contexts, a student might check whether a candidate function f produces f(3) = 2.718281828, or write the pair in a table of inputs and outputs. Recognising the pair as a single data point, not a definition, prevents the common error of assuming the mapping is a general rule.
Your focus
- 3 ↦ 2.718281828
Which command word is this?
Perform mathematical operations step-by-step to arrive at a numerical solution. Working must be shown to secure method marks.
Vectors exam tips
Topic Overview
Vectors bridge pure mathematics and computer science, representing entities that possess both magnitude and direction or serving as ordered collections of numeric attributes. In AQA A-Level Computer Science, vectors are examined both as abstract mathematical structures and as concrete computing abstractions implemented via one-dimensional arrays, lists, or dictionary-style functions.
Understanding vectors and their core operations is foundational to computer graphics pipelines, computer vision, data science, and artificial intelligence. Whether transforming 3D models in a rendering engine, computing cosine similarities in search engines, or calculating velocities in game physics, vector algebra provides the fundamental computational toolset.
Key Concepts
- →Representation: Vectors can be represented as geometric arrows, ordered lists/1D arrays of components, or as functions mapping an index set to real numbers.
- →Vector Addition & Scalar Multiplication: Adding vectors component by component, and scaling vectors by multiplying each component by a single real value.
- →Dot Product (Scalar Product): The sum of the products of corresponding components, yielding a scalar used to determine angles, projections, and orthogonality.
- →Convex Combination: A linear combination alpha * u + beta * v where weights are non-negative and sum to 1, used for geometric interpolation between points.
Marking Points
- Identifies 3 as the input and 2.718281828 as the output of the mapping
- Recognises that the pair is one data point and does not define the whole function
- Recognises 2.718281828 as an approximation of e to nine decimal places
- Checks a proposed rule by substituting 3 and comparing the output
Examiner Tips
- 💡Name the input before the arrow and the output after it in your answer
- 💡Test any candidate rule by substituting the input and checking the output matches
- 💡Remember that one mapping pair cannot uniquely determine a function
- 💡When asked to represent a vector as a function, explicitly define the domain and the mapping rule, e.g., f: {0, 1, 2} -> R where f(0) = 4, f(1) = -2, f(2) = 7.
- 💡In calculation questions, clearly show each individual multiplication step before adding the terms to ensure method marks even if an arithmetic error occurs.
- 💡Always state whether a final output is a scalar or a vector to prevent ambiguity in your written answers.
Common Mistakes
- Treats a single input-output pair as proof of the complete rule; one pair can be produced by many different functions
- Reverses the input and output, reading 2.718281828 as the argument and 3 as the result
- Assumes the decimal is exact rather than a rounded approximation of e
- Believing vectors can only represent 2D or 3D physical coordinates, whereas in computer science they frequently represent n-dimensional feature spaces such as word embeddings or RGB colour channels.
- Treating the dot product as component-wise multiplication that outputs another vector, rather than summing the products to yield a scalar.
- Assuming any linear combination is a convex combination, neglecting the strict constraints that alpha >= 0, beta >= 0, and alpha + beta = 1.
Revision Plan
- 1Day 1-2: Master the three representations of vectors (arrows/tuples, 1D arrays, and mathematical functions).
- 2Day 3-4: Practice vector addition, subtraction, and scalar multiplication both algebraically and graphically.
- 3Day 5-6: Focus on the dot product, practicing manual calculations, orthogonality tests, and geometric angle interpretations.
- 4Day 7-8: Learn convex combinations, linear interpolation (lerp), and their real-world applications in rendering and animation.
- 5Day 9-10: Work through past AQA exam questions to refine your speed and terminology.
Exam Question Types
- 📋Calculation questions: Computing scalar multiples, vector additions, dot products, or convex combinations.
- 📋Definition and representation questions: Defining a vector mathematically, writing a vector as a formal function, or describing array storage.
- 📋Application and scenario questions: Explaining how vectors and dot products are used in 3D graphics, collision detection, or text search algorithms.
Command Word Expectations (AQA)
Perform mathematical operations step-by-step to arrive at a numerical solution. Working must be shown to secure method marks.
Provide a reasoned explanation detailing how or why a vector operation works, linking mathematical properties to the scenario.
Give a concise, factual answer or definition without extensive discussion or calculation.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: Given vectors a = [3, -1, 4] and b = [2, 5, -2], calculate the dot product a . b and determine whether the two vectors are orthogonal.
- 1.Step 1: Write out the component-wise products: (3 * 2) + (-1 * 5) + (4 * -2).
- 2.Step 2: Evaluate each multiplication: 6 + (-5) + (-8).
- 3.Step 3: Sum the scalar terms: 6 - 5 - 8 = -7.
- 4.Step 4: Test for orthogonality. Two vectors are orthogonal if and only if their dot product equals 0. Since -7 != 0, the vectors are not orthogonal.
Question: A graphics engine interpolates between point P = [10, 40] and point Q = [50, 120] using a convex combination with alpha = 0.25 and beta = 0.75. Calculate the coordinates of the resulting point R.
- 1.Step 1: Check that the weights define a valid convex combination: alpha >= 0 (0.25 >= 0), beta >= 0 (0.75 >= 0), and alpha + beta = 0.25 + 0.75 = 1.0.
- 2.Step 2: Apply the formula R = alpha * P + beta * Q: R = 0.25 * [10, 40] + 0.75 * [50, 120].
- 3.Step 3: Multiply each vector by its scalar weight: 0.25 * [10, 40] = [2.5, 10]; 0.75 * [50, 120] = [37.5, 90].
- 4.Step 4: Sum the resulting components: R = [2.5 + 37.5, 10 + 90] = [40, 100].