To wczesna wersja strony: treści i symulacje wciąż się zmieniają, a niektóre mogą mieć błędy.This is an early version of the site: lessons and simulations are still changing, and some may contain mistakes.Zgłoś problemReport a problem
Vectors
Force, velocity, acceleration, the magnetic field – almost everything interesting in physics has not only a magnitude but also a direction. Vectors are the language in which we write such quantities. In this topic you will learn to draw them, add them, resolve them into components and multiply them in two different ways, and in the interactive calculator you will see every operation with your own eyes – just drag an arrow.
Co musisz umieć?What you need to know(1)(matematyka szkolnaschool maths: 1)
Matematyka, poziom szkolny (algebra, trygonometria, składowe wektorów)Maths, school level (algebra, trigonometry, vector components)
sinus, cosinus i tangenssine, cosine and tangentStosunki boków w trójkącie prostokątnym: sin = naprzeciw/przeciwprostokątna, cos = przy kącie/przeciwprostokątna, tg = naprzeciw/przy kącie.Ratios of sides in a right triangle: sin = opposite/hypotenuse, cos = adjacent/hypotenuse, tan = opposite/adjacent.Dowiedz się więcej →Learn more →
Najedź na pojęcie, żeby zobaczyć krótką definicję, albo kliknij „Dowiedz się więcej”.Hover a term for a short definition, or click “Learn more”.
1. Scalars and vectors
We draw a vector as an arrow: the length is the magnitude, the line is the direction, and the arrowhead shows the sense.
Relations and special vectors
The zero vector0: has length 0 and an undefined direction.
Equal vectorsa=b: the same length, direction and sense – regardless of the point of application (a vector can be translated parallel to itself).
The opposite vector−a: the same length and direction, opposite sense (the angle between them is 180∘).
Parallel (same-sense) vectors: the same direction and sense (angle 0∘).
Orthogonal vectors (perpendicular) a⊥b: the angle between them is 90∘.
2. Geometric operations and resolving a vector
Graphical addition
Both rules give the same sum vector.
The triangle rule (tip to tail): attach the tail of b to the tip of a; the sum a+b runs from the tail of a to the tip of b. For many vectors we use the polygon rule.
The parallelogram rule: with a common origin, the sum a+b is the diagonal of the parallelogram spanned by a and b.
Addition is commutative(a+b=b+a) and associative.
Subtraction and multiplication by a scalar
Subtraction:a−b=a+(−b). With a common origin, the difference vector runs from the tip of b to the tip of a (the other diagonal of the parallelogram).
Multiplication by a scalar ka: length ∣k∣a, the same direction; the sense is the same as a for k>0, opposite for k<0, and for k=0 we get the zero vector. Multiplication is distributive: k(a+b)=ka+kb and (k+l)a=ka+la.
The difference a − b joins the tips (from the tip of b to the tip of a). Multiplying by a number changes the length, and a negative number reverses the sense.
Resolving a vector into components
The components are the legs of a right triangle whose hypotenuse is the vector: a_x = a cos α is next to the angle, a_y = a sin α is opposite it.
Every vector can be written as the sum of two others: a=a1+a2.
Perpendicular components:ax=acosα,ay=asinα.
Non-perpendicular components: we draw a parallelogram whose sides lie on two non-parallel lines k and l, with a as its diagonal (e.g. resolving the weight of a lamp into two slanted cables).
The most important example from physics is the weight of a body on an inclined plane with angle of inclination α: the component parallel to the plane Q∥=Qsinα, the component perpendicular to it Q⊥=Qcosα.
🎯 What question does this simulation answer? How does the weight split into a component along the incline and one perpendicular to it?
🧪 Try these in turn:
▶ After choosing an experiment press Start (or drag the time slider).
Q∥=Qsinα=50 N · Q⊥=Qcosα=86.6 N Check: Q∥2+Q⊥2=100 N=Q
Change the angle and the weight. Notice that for α = 0° the whole weight presses on the ground, and for large angles almost all of it pulls the block down the plane.
Non-perpendicular components in practice
When the directions k and l are not perpendicular, there are no simple formulas acosα and asinα, but the triangle formed by a1,a2 and a lets us use the law of sines. Let the directions k and l make an angle γ and let a lie between them: it makes an angle α with direction k and an angle β with direction l (so α+β=γ). Then:
Through the tip of vector a we draw lines parallel to the directions k and l (dashed). This gives a parallelogram whose sides are the components a₁ and a₂. The triangle O, tip of a₁, tip of a has angles α, β and 180° − γ, hence the law of sines.
Check the formula for γ=90∘: then β=90∘−α, so a1=acosα and a2=asinα – we are back to perpendicular components. You can also resolve everything onto the X and Y axes and solve a system of equations; it is the same thing, only algebraic. You will use the formula in exercise 3 (a sign on two cables at different angles).
3. Coordinate systems, unit vectors and trigonometry of any angle
Analytical notation in 2D and 3D
In a right-handed Cartesian system OXYZ we introduce dimensionless unit vectors along the axes, i^,j^,k^, of length 1:
A vector with tail A=(xA,yA,zA) and tip B=(xB,yB,zB):
AB=[xB−xA,yB−yA,zB−zA]
Length (modulus):∣a∣=ax2+ay2+az2.
Direction unit vector:a^=∣a∣a (a vector of length 1 pointing along a).
Operations on coordinates
a±b=[ax±bx,ay±by,az±bz],ka=[kax,kay,kaz]
Condition for parallelism:b=ka for some number k.
Equality of vectors:a=b⟺ax=bx,ay=by,az=bz. One vector equation is as many scalar equations as the space has dimensions. That is why, e.g., the equation F=ma is written separately for the x and y axes.
The angle of a vector and trigonometry of any angle
We measure the angle α from the positive X half-axis counter-clockwise:
ax=acosα,ay=asinα,tanα=axay
Quadrant
Range of angle α
sinα
cosα
tanα
Correction after arctan
I
0∘–90∘
+
+
+
none
II
90∘–180∘
+
−
−
add 180∘
III
180∘–270∘
−
−
+
add 180∘
IV
270∘–360∘
−
+
−
add 360∘ (or keep it negative)
The signs of the components depend on the quadrant the vector lies in. The angle α is always measured from the positive x half-axis anticlockwise: for vector b in quadrant II α = 145°, so cos α < 0 and the x component is negative.
Polar coordinates
A point in the plane can also be described by its distance from the originr and an angleφ measured from the positive X half-axis counter-clockwise. This is the natural language of circular motion and of everything that rotates.
The position vector of the point is r=rr^, where the unit vector r^ points from the origin to the point, and the perpendicular unit vector φ^ points in the direction of increasing angle:
r^=cosφi^+sinφj^,φ^=−sinφi^+cosφj^
Unlike i^ and j^, these unit vectors change direction as the point moves. That is why circular motion is conveniently described in them.
✦ Dla ciekawych (poziom akademicki, można pominąć)For the curious (university level, can be skipped) · rotating the coordinate system does not change the physics
We can set the axes however we like, e.g. along an incline instead of horizontally. When the system is rotated by an angle φ, the components of the same vector change:
ax′=axcosφ+aysinφ,ay′=−axsinφ+aycosφ
but the vector itself does not. Its length is the same (ax′2+ay′2=ax2+ay2, because sin2φ+cos2φ=1), and the angle to the new axis is θ′=θ−φ. For example, a=[3;4] in a system rotated by 90∘ has components [4;−3], and its length is still 5.
Since vector addition, the dot product (e.g. work F∘Δr) and lengths do not depend on the choice of axes, a vector equation true in one system is true in every system. That is why the laws of physics are written in vector form, and the axes are chosen to make the calculations as simple as possible.
4. The dot product and the cross product
The dot product a∘b – the result is a number
In the literature you will also meet the notation a⋅b.
Properties: it is commutative (a∘b=b∘a) and distributive over addition, a∘a=a2, and for the unit vectors i^∘i^=j^∘j^=k^∘k^=1 and i^∘j^=j^∘k^=k^∘i^=0.
The projection of vector b on the direction of a has length b cos θ (green segment). The dot product is the length of a multiplied by this projection. When θ = 90° the projection vanishes and the product is zero; when θ > 90° the projection falls on the other side and the product is negative.
Applications:
The angle between vectors:cosφ=aba∘b. For nonzero vectors a⊥b⟺a∘b=0.
The projection of a onto the direction of b: the component ab=acosφ=ba∘b, and the projection vector ab=b2a∘bb.
The work of a constant force:W=F∘Δr=FΔrcosφ.
The cross product a×b – the result is a vector
For c=a×b:
Length:∣a×b∣=absinφ – geometrically this is the area of the parallelogram spanned by a and b.
Direction and sense:c is perpendicular to the plane determined by a and b. The sense is given by the right-hand rule (right-handed screw rule): you rotate a toward b through the smaller angle, and your thumb points in the direction of the result.
Properties: the product is not commutative, since b×a=−a×b; it is distributive; a×a=0. For nonzero vectors a∥b⟺a×b=0.
The product a × b is perpendicular to the plane of the vectors a and b, and its length is the area of the shaded parallelogram, ab sin φ. The right-hand rule gives the sense: the fingers turn a towards b, the thumb points along a × b. Swapping the order, b × a, reverses the sense.
The cycle of unit vectors. The products of the unit vectors form the cycle i^→j^→k^→i^: going along the cycle gives a + sign, and going against it gives a − sign:
i^×j^=k^,j^×k^=i^,k^×i^=j^
▶ SymulacjaSimulation: The cycle of unit vectors and the right-hand ruleSpacja: start/pauza · R: resetSpace: start/pause · R: reset⚑︎
First:
Second:
i^×j^=+k^
You go along the cycle arrows i → j → k → i, so the result has a "+" sign.
Choose two unit vectors and see the sign and the result of their cross product.
Applications in physics: the torque M=r×F and the Lorentz force F=qv×B.
✦ Dla ciekawych (poziom akademicki, można pominąć)For the curious (university level, can be skipped) · proofs of the properties and the triple product
Why is a∘(a×b)=0? By definition the vector a×b is perpendicular to a, and cos90∘=0. The same follows from the calculation on coordinates: all the terms cancel.
The identity (a×b)2+(a∘b)2=a2b2. It follows from a2b2sin2φ+a2b2cos2φ=a2b2. So the dot and cross products together carry the full information about the angle between the vectors.
When a+b⊥a−b. Then (a+b)∘(a−b)=a2−b2=0, so a=b: the diagonals of a parallelogram are perpendicular only if it is a rhombus.
The scalar triple product. The number a∘(b×c) is (with sign) the volume of the parallelepiped spanned by the three vectors: ∣b×c∣ is the area of the base, and the projection of a onto the direction of b×c is the height. Zero means the three vectors lie in one plane.
Direction cosines. The angles θx,θy,θz that a vector makes with the axes satisfy cosθx=ax/a etc. and cos2θx+cos2θy+cos2θz=1.
Rotating the coordinate system changes the components of a vector, but not its length or the dot product, since those depend only on the lengths and the angle between the vectors.
5. The vector calculator and visualiser
Enter the coordinates, or the length and angle, or simply grab the arrowhead and drag it across the grid. Switch between operations (addition, subtraction, linear combination, components and projection, products) and watch the constructions and the results live.
🎯 What question does this simulation answer? How do we add and subtract vectors graphically and how does the result change when you change the length or direction of the vectors?
🧪 Try these in turn:
▶ After choosing an experiment press Start (or drag the time slider).
a
b
Presets:
Scale:±5
a+b=[4,3]
b=[1,2]
a=[3,1]
Grab and drag the tip of vector a or b (a round handle surrounds the arrowhead).
Results
a=3i^+1j^=[3,1],∣a∣=3.162
b=1i^+2j^=[1,2],∣b∣=2.236
Angles (quadrant-corrected):
α=18.43∘=0.322 rad(quadrant I)
β=63.43∘=1.107 rad(quadrant I)
a+b=4i^+3j^=[4,3],∣a+b∣=5 , γ=36.87∘
Angle between the vectors: φ=45∘=0.785 rad
a∘b=axbx+ayby=5
a×b=(axby−aybx)k^=5k^ — parallelogram area =5, direction ⊙ (toward you)
Blue – vector a, red – vector b, purple – the result of the operation, orange – the projection of a onto the direction of b.
Problems and quiz
Multiple-choice questions
1.Vectors a and b have magnitudes 2 and 5, and the angle between them is 120∘. The dot product a∘b equals:
2.Two forces of magnitudes 6 N and 8 N act on the same point. Which value can the net force NOT have?
3.A force F=[0,5] N is applied at a point with position vector r=[2,0] m relative to the axis of rotation. The torque r×F has:
4.The vector [−1,−3] makes an angle with the positive X axis (measured counter-clockwise) of:
5.A force F=[3,4] N acts on a body that is displaced by Δr=[4,−3] m. The work done by this force is:
6.A point with Cartesian coordinates (−4,−3) m has polar coordinates r=5 m and an angle φ of about:
Score: 0 / 6
Correctness of vector notation
For each expression decide whether it is valid (and whether it gives a scalar or a vector), or contains an error. The letters a,b,c denote vectors.
(a×b)∘b
2∣b∣a−c
a∘b+∣c∣
a×b+a∘b
∣a∣∣b∣a∘b
a×a
a×b
F∘Δr
Correct: 0 / 8
Calculation exercises
In the planar exercises, the “Load into the calculator” button (inside the solution) shows the data on the plot.
Exercise 1 – a vector from the coordinates of two points. A drone flew from the point P=(−2;1) km to the point Q=(3;13) km. Find the displacement vector PQ, its length, and the angle it makes with the OX axis (in degrees and in radians).
°
Pokaż wskazówkęShow hint
The components of the vector are differences of coordinates: tip minus tail. For the angle use tanα=axay, but first check which quadrant the vector lies in.
Rozwiązanie krok po krokuStep-by-step solution
PQ=[3−(−2),13−1]=[5,12] km,∣PQ∣=52+122=13 km
Both components are positive (quadrant I), so no correction is needed:
tanα=512=2.4⇒α=arctan2.4≈67.38∘≈67.38∘⋅180∘π≈1.176 rad
Exercise 2 – a compass direction. A cyclist rode 18.0 km in the direction 35∘ west of south. Take the X axis to the east and the Y axis to the north. How many kilometres did the cyclist move to the south, and how many to the west? Write the displacement vector.
km
Pokaż wskazówkęShow hint
The angle is measured from south (not from the OX axis!), so the southern component has cos35∘ and the western one sin35∘. With X pointing east and Y north, south and west are negative directions.
Rozwiązanie krok po krokuStep-by-step solution
dS=18.0cos35∘≈14.74 km,dW=18.0sin35∘≈10.32 km
The displacement vector (coordinates with signs): d=[−10.32,−14.74] km.
Exercise 3 – a sign on two cables at different angles. A sign of weight 120 N hangs at rest on two cables fixed to the ceiling on opposite sides of the sign. The left cable makes an angle of 30∘ with the horizontal, the right one 50∘. Calculate the tension in each cable.
N
Pokaż wskazówkęShow hint
The sign is in equilibrium, so the net force is zero. The horizontal components of the tensions must cancel, and the vertical ones together must balance the weight. You get two equations with two unknowns (or use the law of sines).
Rozwiązanie krok po krokuStep-by-step solution
Horizontally and vertically:
TLcos30∘=TRcos50∘⇒TL=TRcos30∘cos50∘≈0.742TR
TLsin30∘+TRsin50∘=Q⇒TR(0.742⋅0.5+0.766)=120 N⇒TR≈105.5 N
Hence TL≈0.742⋅105.5≈78.3 N.
Check with the law of sines: the direction of the force balancing the weight (vertically up) makes 40∘ with the right cable and 60∘ with the left one, and the cables make γ=100∘ with each other. So TR=Qsin100∘sin60∘≈105.5 N and TL=Qsin100∘sin40∘≈78.3 N ✓
The steeper cable takes over more of the weight: TRsin50∘≈80.8 N against TLsin30∘≈39.2 N (together 120 N).
Exercise 4 – operations in 3D. The vectors a=[2,−1,3] and b=[1,4,−2] are given. Calculate ∣a∣,a+b,2a−3b,a∘b,a×b and the angle between a and b.
Pokaż wskazówkęShow hint
Do all the operations on the coordinates. In the cross product follow the formula with i^,j^,k^ and watch the signs, and find the angle from cosφ=aba∘b.
Exercise 5 – the work of several forces. A block on a smooth table is pulled by three strings: F1=[3,−2] N,F2=[−1,4] N,F3=[−5,−1] N. The block moves by Δr=[2,3] m. Calculate the work of the net force and compare it with the sum of the works of the individual forces. What does the sign of the result mean?
J
Pokaż wskazówkęShow hint
Work is the dot product W=F∘Δr. The dot product is distributive over addition, so both ways of calculating it must give the same result.
Exercise 6 – the Lorentz force on a proton. A proton (q=1.6⋅10−19 C) moves in the XY plane with velocity v=(3i^+4j^)⋅106 m/s in a magnetic field B=0.30k^ T perpendicular to that plane. Calculate the Lorentz force F=qv×B and its magnitude, and check that it is perpendicular to the velocity.
·10⁻¹³ N
Pokaż wskazówkęShow hint
The cycle of unit vectors helps: j^×k^=i^,k^×i^=j^, so i^×k^=−j^. Check perpendicularity with the dot product F∘v.
F=1.6⋅10−19⋅(1.2i^−0.9j^)⋅106=(1.92i^−1.44j^)⋅10−13 N
F=1.922+1.442⋅10−13=2.4⋅10−13 N
Check: B is perpendicular to v, so F=qvB=1.6⋅10−19⋅5⋅106⋅0.30=2.4⋅10−13 N ✓ (with v=32+42⋅106=5⋅106 m/s).
Perpendicularity: F∘v∝1.92⋅3+(−1.44)⋅4=5.76−5.76=0 ✓. The force has no component along the velocity, so it does not change its magnitude; the proton only turns.
Exercise 7 – a buoy in equilibrium. A buoy floats at rest. Three horizontal ropes act on its eye. Rope 1 pulls with a force of 60 N to the east, rope 2 with a force of 80 N in a direction making an angle of 120∘ with the X axis (east; the angle is measured counter-clockwise). What magnitude and direction must the force of rope 3 have?
Top view; the angle is measured from the X axis anticlockwise.
N
Pokaż wskazówkęShow hint
The buoy is in equilibrium, so F1+F2+F3=0, i.e. F3=−(F1+F2). Resolve F2 into components, add the components, and only then calculate the length and the angle. Watch the quadrant for the angle.
Rozwiązanie krok po krokuStep-by-step solution
F1=[60,0] N,F2=[80cos120∘,80sin120∘]=[−40,69.28] N
F1+F2=[20,69.28] N⇒F3=[−20,−69.28] N
F3=202+69.282=5200≈72.11 N
Angle: arctan2069.28≈73.9∘, but both components are negative (quadrant III), so φ=180∘+73.9∘≈253.9∘ from the X axis; that is, rope 3 pulls south of west, at 73.9∘ from the westerly direction.
Exercise 8 – polar and Cartesian coordinates. A radar at a station (the origin, X axis to the east) records two echoes. Echo A has polar coordinates r=12.0 km,φ=150∘. Echo B has Cartesian coordinates (−3.0;−4.0) km. Give (a) the Cartesian coordinates of echo A, (b) the polar coordinates of echo B (the angle φ in the range 0∘–360∘), (c) the distance between the echoes.
°
Pokaż wskazówkęShow hint
(a) x=rcosφ,y=rsinφ. (b) r=x2+y2, and the angle from arctanxy must be corrected for the quadrant. (c) The distance is the length of the difference vector of the Cartesian coordinates.
Rozwiązanie krok po krokuStep-by-step solution
(a) xA=12.0cos150∘≈−10.39 km,yA=12.0sin150∘=6.00 km.
(b) rB=32+42=5.0 km. The point lies in quadrant III (x<0,y<0):arctan34≈53.13∘, so φB=180∘+53.13∘≈233.1∘.
(c) AB=[−3−(−10.39),−4−6]=[7.39,−10] km, so d=7.392+102≈12.4 km.