# Analytic Geometry in R2

:

• The Principle which I have always observed in my studies and which I believe has helped me the most to gain what knowledge I have, has been never to spend beyond a few hours daily in thoughts which occupy the imagination, and a few hours yearly in those which occupy the understanding, and to give all the rest of my time to the relaxation of the senses and the repose of the mind…As for me, I have never presumed my mind to be in any way better than the minds of people in general. As for reason or good sense, I am inclined to believe that it exists whole and complete in each of us, because it is the only thing that makes us men and distinguishes us from the lower animals. (Descartes)
• Philosophy is written in the great book (by which I mean the Universe) which stands always open to our view, but it cannot be understood unless one first learns how to comprehend the language and interpret the symbols in which it is written, and its symbols are triangles, circles, and other geometric figures, without which it is not humanly possible to comprehend even one word of it; without these one wanders in a dark labyrinth. (Galileo)
• If there is any thinking to be done in this Forest – and when I say thinking, I mean thinking – you and I must do it.(Milne, The House at Pooh Corner)

# The Euclidean plane R2

We give a brief introduction to analytic geometry of  the two-dimensional Euclidean plane. Our common school experience has given us an intuitive geometric idea of the Euclidean plane as an infinite flat surface without borders consisting of points, and we also have an intuitive geometric idea of geometric objects like pointsstraight lines, triangles and circles in the plane.

For a more detailed account see Descartes World of Analytical Geometry.

We are familiar with the idea of using a coordinate system in the Euclidean plane consisting of two perpendicular straight lines with each point in the plane identified by two coordinates (a1, a2) in  Q2 where a1 and a2 are rational numbers,  and  latex Q2 is the set of all ordered pairs of rational numbers.

With only the rational numbers Q at our disposal, we quickly run into trouble because we cannot the distance between points in Q2 may not be a rational number. For example, the distance between the points (0,0) and (1,1), the length of the diagonal of a unit square, is equal to √2, which is not a rational number.

The troubles are resolved by using real numbers, that is by extending Q2 to R2 where R is the set of real numbers. We recall that rational numbers have finite or periodic decimal expansions while non-rational or irrational real numbers have infinite decimal expansion which never repeat periodically.

In this chapter, we present basic aspects of analytic geometry in the Euclidean planeusing a coordinate system identified with R2, following the fundamental idea of Descartes to describe geometry in terms of numbers.

Below, we extend to analytic geometry in three-dimensional Euclidean space identified with R3 and we finally generalize to analytic geometry in Rn, where the dimension n can be any natural number.

Considering Rn with n > 3 leads to linear algebra with a wealth of applicationsoutside Euclidean geometry, which we will meet below.

The concepts and tools we develop in this chapter focussed on Euclidean geometry in R2 will be of fundamental use in the generalisations to geometry in R3 and Rn and linear algebra.

The tools of the geometry of Euclid is the ruler and the compasses, while the tool of analytic geometry is a calculator for computing with numbers. Thus we may say that Euclid represents a form of analog technique, while analytic geometry is a digital technique based on numbers. Today, the use of digital techniques is exploding in communication and music and all sorts of virtual reality.

# Descartes, Inventor of Analytic Geometry

The foundation of modern science was laid by Ren’e Descartes (1596-1650) in Discours de la method pour bien conduire sa raison et chercher la verite dans les sciences from 1637. The Methodcontained as an appendix La Geometrie with the first treatment of Analytic Geometry.

Descartes believed that only mathematics may be certain, so all must be based on mathematics, the foundation of the Cartesian view of the World.

In 1649 Queen Christina of Sweden persuaded Descartes to go to Stockholm to teach her mathematics. However the Queen wanted to draw tangents at 5 a.m. and Descartes broke the habit of his lifetime of getting up at 11 o’clock. After only a few months in the cold Northern climate, walking to the palace at 5 o’clockevery morning, he died of pneumonia.

# Descartes: Dualism of Body and Soul

Descartes set the standard for studies of Body and Soul for a long time with his De homine completed in 1633, where Descartes proposed a mechanism for automatic reaction in response to external events through nerve fibrils:

In Descartes’ conception, the rational Soul, an entity distinct from the Body and making contact with the body at the pineal gland, might or might not become aware of the differential outflow of animal spirits brought about though the nerve fibrils. When such awareness did occur, the result was conscious sensation — Body affecting Soul. In turn, in voluntary action, the Soul might itself initiate a differential outflow of animal spirits. Soul, in other words, could also affect Body.

In 1649 Descartes completed Les passions de lame, with an account of causal Soul/Bodyinteraction and the conjecture of the localization of the Soul’s contact with the Body to the pineal gland.

Descartes chose the pineal gland because it appeared to him to be the only organ in the brain that was not bilaterally duplicated and because he believed, erroneously, that it was uniquely human; Descartes considered animals as purely physical automata devoid of mental states.

# The Euclidean Plane R2

We choose a coordinate system for the Euclidean plane consisting of two straight lines intersecting at a 90 degrees angle at a point referred to as the origin. One of the lines is called the x1-axis and the other the x2-axis, and each line is a copy of the real line R. The coordinates of a given point a in the plane is the ordered pair of real numbers (a1, a2), where a1 corresponds to the intersection of the x1-axis with a line through a parallel to the x2-axis, and a2 corresponds to the intersection of the x2-axis with a line through a parallel to the x1-axis. The coordinates of the origin are (0,0).

Coordinate system for $R^2$

In this way, we identify each point a in the plane with its coordinates (a1,a2), and we may thus represent the Euclidean plane as R2, where R2 is the set of ordered pairs (a1, a2)  of real numbers a1 and a2. That is

• R2={(a1, a): a1, a2 ∈ R}.

We have already used R2 as a coordinate system above when plotting a function f: R → R ,where pairs of real numbers (x ,f(x)) are represented as geometrical points in a Euclidean plane on a book-page.

To be more precise, we can identify the Euclidean plane with R2, once we have chosen the(i) origin, and the (ii) direction (iii) scaling of the coordinate axes.

There are many possible coordinate systems with different origins and orientations/scalingsof the coordinate axes, and the coordinates of a geometrical point depend on the choice of coordinate system. The need to change coordinates from one system to another thus quickly arises, and will be an important topic below.

Often, we orient the axes so that the x1 – axis is horizontal and increasing to the right, and the x2 – axis is obtained rotating the  x1 – axis by 90 degrees, or a quarter of a complete revolution counter-clockwise, with the positive direction of each coordinate axis may be indicated by an arrow in the direction of increasing coordinates.

However, this is just one possibility. For example, to describe the position of points on a computer screen or a window on such a screen, it is not uncommon to use coordinate systems with the origin at the upper left corner and counting the a2 coordinate positive down, negative up.

# Surveyors and Navigators

Recall our friends the Surveyor in charge of dividing land into properties, and the Navigator in charge of steering a ship. In both cases we assume that the distances involved are sufficiently small tomake the curvature of the Earth negligible, so that we may view the world as R2.

Basic problems faced by a Surveyor are (s1) to locate points in Nature with given coordinates on a map and (s2) to compute the area of aproperty knowing its corners.

Basic problems of a Navigator are (n1) to find the coordinates on a map of his present position in Nature and (n2) to determine the present direction to follow to reach a point of destiny.

We know from Chapter 2 that problem (n1) may be solved using a GPS navigator, which givesthe coordinates (a1, a2) of the current position of the GPS-navigator at a press of a button. Also problem (s1) may be solved using a GPS-navigator iteratively in an `inverse” manner: press the button and checkwhere we are and move appropriately if our coordinates are not the desired ones. In practice, the precision of the GPS-system determines its usefulness and increasing the precision normally opens a new area of application. The standard GPS with a precision of 10 meters may be OK for a navigator, but not for a surveyor, who would liketo get down to meters or centimeters depending on the scale of the property.

Scientists measuring continental drift or beginning landslides, use an advanced form of GPS with a precision of millimeters.

Having solved the problems (s1) and (n1) of finding the coordinates of a given pointin Nature or vice versa,there are many related problems of type (s2) or (n2) that can be solved using mathematics, such as computing the area of pieces of land with given coordinates or computing the direction of a piece of a straight line with given start and end points.

These are examples of basic problems of geometry, which we now approach to solve using tools of analytic geometry or linear algebra.

# A First Glimpse of Vectors

Before entering into analytic geometry, we observe that R2, viewed as the set of ordered pairs of real numbers, can be used for other purposes than representing positions of geometric points. For example to describe the current weather, we could agree to write (27, 1013) to describe that the temperature is 27 C and the air pressure 1013 millibar. We then describea certain weather situation as an ordered pair of numbers, such as (27, 1013).

Of course the order of the two numbers is critical for the interpretation. A weather situation described by the pair (1013, 27) with temperature 1013 and pressure 27, is certainly very different from that described by (27, 1013) with temperature  27 and pressure 1013.

Having liberated ourselves from the idea that a pair of numbers must represent the coordinates of a point in a Euclidean plane, there are endless possibilities of forming pairs of numbers with the numbers representingdifferent things. Each new interpretation may be viewed as a new interpretation of R2.

In another example related to the weather, we could agree to write  (8, NNE) to describe that the current wind is 8 m/s and headed North-North-East (and coming from South-South-East. Now, NNE  is not a real number, so in order to couple to R2, we replace NNE by the corresponding angle, that is by 22.5 degrees counted positive clockwise starting from theNorth direction. We could thus indicate a particular wind speed and direction by the ordered pair (8, 22.5).

You are no doubt familiar with the weather man’s way of visualizing such a wind on the weather map using an arrow.

The wind arrow could also be described in terms of another pair of parameters, namely by how much it extends to the East and to the North respectively, that is by the pair (8*sin(22.5) ,8*cos(22.5) ) ≈  (3.06, 7.39). We could say that 3.06 is the “amount of East”, and 7.39 is the “amount of North” of the wind velocity, while we may say that the wind speed is 8, where we think of the speed as the “absolute value” of the wind velocity (3.06,  7.39). We thus think of the wind velocity as having both a direction, and an “absolute value” or “length”.

In this case, we view an ordered pair (a1, a2) as a  vector, rather than as a point, and we can then represent the vector by an arrow.

We will soon see that ordered pairs viewed as vectors may be scaled through multiplication by a real number and two vectors may also be added.

Addition of velocity vectors can be experienced on a bike where the wind velocity and our own velocity relative to the ground add together to form the total velocity relative to the surrounding atmosphere, which is reflected in the air resistance we feel.

To compute the total flight time across the Atlantic, the airplane pilot adds the velocity vector of the airplane versus the atmosphere and the velocity of the jet-stream together to obtain the velocity of the airplane vs the ground.

We will return below to applications of analytic geometry to mechanics, including these examples.

# Ordered Pairs as Points or Vectors/Arrows

We have seen that we may interpret an ordered pair of real numbers (a1, a2) as a  point a in  R2  with coordinates a1 and a2. We may write  a= (a1, a2) for short, and say that a1 is the first coordinate of the point a and a2 the second coordinate of a.

We shall also interpret an ordered pair (a1, a2 in R2 in a alternative way, namely as an arrow with tail at the origin and the head at the point a=(a1, a2):

A vector with tail at the origin and the head at the point a = (a1, a2).

With the arrow interpretation of (a1, a2), we refer to (a1, a2) as a vector. Again, we agree to write a = (a1, a2), and we say that  a1 and  a2$are the components of the arrow/vector a = (a1, a2). We say that a1 is the first component, occurring in the first place and a2 the second component occurring in the second place. We thus may interpret an ordered pair (a1, a2) in R2 in two ways: • as a point with coordinates (a1, a2), • as an arrow/vector with components (a1, a2) starting at the origin and ending at the point (a1, a2). Evidently, there is a very strong connection between the point and arrow interpretations, since the head of the arrow is located at the point (and assuming that the arrow tail is at the origin). In applications, positions will be connected to the point interpretation and velocities and forces will be connected to the arrow/vector interpretation. We will below generalize the arrow/vector interpretation to include arrows with tails also at other points than the origin. The context will indicate which interpretation is most appropriate for a given situation. Often the interpretation of a=(a1, a2) as a point or as an arrow, changes without notice. So we have to be flexible and use whatever interpretation is most convenient or appropriate. We will need even more fantasy when we go into applications to mechanics below. Sometimes vectors like a=(a1, a2) are marked by boldface or an arrow or double script or some other notation. We prefer not to use this more elaborate notation, which makes the writing simpler, but requires fantasy from the user to make the proper interpretation of for example the letter a as a scalar number, or vector a = (a1, a2), or something else. # Vector Addition We now proceed to define addition of vectors in R2, and multiplication of vectors in R2 by real numbers. In this context, we interpret R2$ as a set of vectors represented by arrows with tail at the origin.

Given two vectors a= (a1, a2) and b = (b1, b2) in R2, we use a+b to denote the vector (a1+b1, a2 + b2) in R2 obtained by adding the components separately. We call a+b the sum of a and b obtained through vector addition. Thus

• a + b = (a1, a2) + (b1, b2) =(a1+b1, a2 +b2),

which says that vector addition is carried out by adding components separately. We note that a+b=b+a since a1 +b1= b1 +a1 and a2 + b2= b2 + a2. We say that 0 = (0,0) is the zero vector since a+0=0+a=a for any vector a. Note the difference between the vector zero and its two zero components.

Example: We have (2, 5) + (7, 1) = (9, 6) and (2.1, 5.3) + (7.6, 1.9) = (9.7, 7.2).

# Vector Addition and the Parallelogram Law

We may represent vector addition geometrically using the Parallelogram Law as follows. The vector a+b corresponds to the arrow along the diagonal in the parallelogram with two sides formed by the arrows a and b (and bara and barb):

This follows by noting that the coordinates of the head of  a+b is obtained by adding the coordinates of the points a and b separately, as just illustrated.

This definition of vector addition implies that we may reach the point (a1+b1, a2+b2) by walking along arrows in two different ways.

First, we simply follow the arrow (a1+b1, a2+b2) to its head, corresponding to walking along the diagonal of the parallelogram formed by  a and  b.

Secondly, we could follow the arrow a from the origin to its head at the point (a1, a2)$and then continue to the head of the arrow barb parallel to b and of equal length as b with tail at (a1, a2). Alternative, we may follow the arrow b from the origin to its head at the point (b1, b2)$ and then continue to the head of the arrow bara parallel to a and of equal length as a with tail at (b1, b2).

The three different routes to the point (a1+b1, a2 +b2) are displayed in the above figure.

We sum up by:

• Adding two vectors a=(a1, a2) and b=(b1, b2) in R2 to get the sum a+b=(a1+b1, a2+b2) corresponds to adding the arrows a and b using the Parallelogram Law.

In particular, we can write a vector as the sum of its components in the coordinate directions as follows:

• (a1, a2) = (a1, 0)+(0, a2),
as illustrated in the following figure:

# Multiplication of a Vector by a Real Number

Given a real number λ and a vector a = (a1, a2) in R2, we define a new vector λ*a by

• λ*a = (λ*a1, λ*a2).

For example, 3*(1.1, 2.3) = (3.3, 6.9). We say that λ*a is obtained by multiplying the vector a = (a1, a2) by the real number λ and call this operation multiplication of a vector by a scalar. Below we will meet other types of multiplication connected with scalar product of vectors and vector product of vectors, both being different from multiplication of a vector by a scalar.

We define  -a = (-1)*a = (-a1, -a2) and a – b = a + (-b). We note that a – a = a + (-a) = (a1 -a1, a2 -a2)=(0,0)=0. We give an example:

The sum 0.7*a – b of the multiples 0.7*a and (-1)*b of a and b.

# The Norm of a Vector

We define the Euclidean norm  |a|  of a vector a=(a1, a2) in R2 as

• $\vert a\vert =(a1*a1+a2*a2)^{1/2}=\sqrt(a1*a1+a2*a2)$.

By Pythagoras theorem, the Euclidean norm |a| of the vector a=(a1, a2) is equal to the length of the hypothenuse of the right angled triangle with sides a1 and a2. In other words, the Euclidean norm Euclidean norm of the vector a = (a1, a2) is equal to the distance from the origin to the point a= (a1, a_2), or simply the length of the arrow (a1, a2).

We have

• $\vert \lambda a\vert =\vert \lambda\vert \vert a\vert$ if $\lambda\in R$ and $a\in R2$;

multiplying a vector by the real number λ changes the norm of the vector by the factor |λ|.

The zero vector (0,0) has Euclidean norm 0 and if a vector has Euclidean norm 0 then it must be the zero vector.

The Euclidean norm of a vector measures the “length” or “size” of the vector.

There are many possible ways to measure the “size” of a vector corresponding to using different norms. We will meet several alternative norms of a vector a=(a_1,a_2), such |a1|+|a2 |,  or max(|a1|, |a2|).

Example: If a=(3,4) then $\vert a\vert = \sqrt{9+16}=5$. and $\vert 2*a\vert =10$.

# Polar Representation of a Vector

The points a = (a1, a2) in R2 with |a| =1 , corresponding to the vectors of Euclidean norm equal to 1, form a circle with radius equal to 1 centered at the origin which we call the unit circle, see:

Each point a on the unit circle can be written $a=(\cos(\theta ),\sin(\theta ))$ for some angle θ, which we refer to as the angle of direction or direction of the vector a. This follows from the definition of $cos(theta )$ and $\sin(\theta )$ in Chapter Pythagoras and Euclid.

Any vector a=(a_1,a_2)≠ (0,0) can be expressed as

• $a=\vert a\vert \hat a=r (\cos(\theta ),\sin(\theta ))$,

where $r=\vert a\vert$ is the norm of $a$, $\hat a=(a_1/\vert a\vert,a_2/\vert a\vert )$is a vector of length one, and θ is the angle of direction of a. This is the polar representation of latex a. We call θ the direction of a and r the length of a:

Vectors a of length r are given by $a=r(\cos(\theta),\sin(\theta))=(r\cos(\theta),r\sin(\theta))$ where $r=\vert a\vert$.}

We see that if $b=\lambda a$, where $\lambda >0$ and $a\neq 0$, then $b$ has the same direction as $a$. If $\lambda <0$ then $b$ has the opposite direction. In both cases,the norms change with the factor $\vert\lambda\vert$; we have $latex\ vert b\vert =\vert\lambda\vert\vert a\vert$.

If $b=\lambda a$, where $\lambda\neq 0$ and $a\neq 0$, then we say that the vector $b$ is parallel to $a$. Two parallel vectors have the same or opposite directions.

Example: We have

• $(1,1)=\sqrt{2}(\cos(45^\circ ),\sin(45^\circ ))$,
• $(-1,1)=\sqrt{2}(\cos(135^\circ ),\sin(135^\circ )).$

# Standard Basis Vectors

We refer to the vectors e1 = (1, 0) and e2 = (0, 1) as the standard basis vectors in R2. A vector a=(a1, a2) can be expressed in term of the basis vectors  e1 and e2 as

• $latex a=a1*e1+a2*e2, since • $a1*e1+a2*e2=a1*(1, 0)+a2*(0, 1) = (a1, 0)+(0, a2)=(a1, a2) = a$. as illustrated in: The standard basis vectors e1 and e2 and a linear combination$latex a=(a1, a2)=a1*e1+a2*e2 of e_1 and e_2.

We say that a1*e1 + a2*e2 is a linear combination} of e1 and e2 with coefficients a1 and a2. Any vector a=(a1, a2) in R2 can thus be expressed as a linear combination of the basis vectors e1 and e2 with the coordinates a1 and a2  as coefficients.

Example: We have $(3,7)=3, (1,0)+7, (0,1)=3e_1+7e_2$.

# Scalar Product

While adding vectors to each other and scaling a vector by a real number multiplication have natural interpretations, we shall now introduce a (first) product of two vectors that is less motivated at first sight.

Given two vectors a=(a1,a2) and  b=(b1,b2) in R2, we define their scalar product $a\cdot b$ by

• $a\cdot b=a1*b1 + a2*b2$.

We note, as the terminology suggests, that the scalar product $a\cdot b$ of two vectors a and b in R2 is a scalar, that is a number in R, while the factors a and b are vectors in R2. Note also that forming the scalar product of two vectors involves not only multiplication, but also a summation!

We note the following connection between the scalar product and the norm:

• $\vert a\vert =(a\cdot a)^{\frac{1}{2}}$.

Below we shall define another type of product of vectors where also the product is a vector.

We shall thus consider two different types of products of two vectors, which we will refer to as the scalar product and the vector product, respectively.

At first when limiting our study to vectors in R2, we may also view the vector product to be a single real number. However, the vector product in R3 is indeed a vector in R3.

We may view the scalar product as a function $f: R2\times R2\rightarrow R$ where $f(a,b)=a\cdot b$.

To each pair of vectors a in R2 and b in R2, we associate the number $f(a,b)=a\cdot b\in R$.

Similarly we may view summation of two vectors as a function $f:R2\times R2\rightarrow R2$.

Here, $R2\times R2$ denotes the set of all ordered pairs (a,b) of vectors $a=(a1, a2)$ and $b=(b1, b2)$ in $R2$, of course.

Example: We have $(3,7)\cdot (5,2)=15+14=29$, and $\latex (3,7)\cdot (3,7)=9+49=58$ so that $vert (3,7)vert =sqrt{58}$.

# Properties of the Scalar Product

The scalar product $a\cdot b$ in $R^2$ is linear in each of the arguments $a$ and $b$, that is

• $a\cdot (b+c)=a\cdot b+a\cdot c$,
• $(a+b)\cdot c=a\cdot c+b\cdot c$,
• $(\lambda a)\cdot b=lambda a\cdot b, \quad a\cdot (\lambda b)=\lambda a\cdot b$ ,

for all $a,b\in R2$ and $\lambda\in R$. This follows directly from the definition. For example, we have

• $a\cdot (b+c)=a_1(b_1+c_1)+a_2(b_2+c_2)$
• $=a_1b_1 + a_2b_2 +a_1c_1 + a_2c_2= a\cdot b+a\cdot c$.

Using the notation $f(a,b)=a\cdot b$, the linearity properties may be written as

• $f(a,b+c)=f(a,b)+f(a,c),quad\quad f(a+b,c)=f(a,c)+f(b,c)$,
• $f(\lambda a,b)=\lambda f(a,b)\quad\quad f(a,\lambda b)=\lambda f(a,b)$.

We also say that the scalar product $a\cdot b=f(a,b)$ is a bilinear form on $R2\times R2$, that is a function from $R2\times R2$ to $R$, since $a\cdot b=f(a,b)$ is a real number for each pair of vectors $a$ and $b$ in $R2$ and $a\cdot b=f(a,b)$ is linear both in the variable (or argument) $\latex a$ and the variable $\latex b$.

Furthermore, the scalar product $a\cdot b=f(a,b)$ is symmetric in the sense that

• $a\cdot b=bcdot a\quad\mbox{or}\quad f(a,b)=f(b,a)$,

and positive definite, that is

• $a\cdot a=|a|^2>0\quad \mbox{for }a\neq 0=(0,0)$.

We may summarize by saying that the scalar product $a\cdot b=f(a,b)$ is a bilinear symmetric positive definite form on $R2\times R2$.

We notice that for the basis vectors $e_1=(1,0)$ and $e_2=(0,1)$, we have

• $e1\cdot e2=0, \quad e1\cdot e1=1,\quad e2\cdot e2=1$.

Using these relations, we can compute the scalar product of two arbitrary vectors $a=(a1, a2)$ and $b=(b1,b2)$ in $R2$ using the linearity as follows:

• $a\cdot b=(a1*e1+a2*e2)\cdot (b1*e1+b2*e2)$
• $=a1*b1*e_1\cdot e_1+ a1*b2*e1\cdot e2+a2*b1*e2\cdot e1+a2*b2*e2\cdot e2=a1*b1 + a2*b2$.

We may thus define the scalar product by its action on the basis vectors and then extend it to arbitrary vectors using the linearity in each variable.,

We shall now prove that the scalar product $a\cdot b$ of two vectors a and b in R2 can be expressed as

• $a\cdot b=\vert a\vert \vert b\vert\cos(\theta )$,     (1)

where $\theta$ is the angle between the vectors a and b.

This formula has a geometric interpretation: Assuming that $\vert \theta\vert le 90^\circ$ so that $\cos(\theta )$ is positive, consider the right-angled triangle $OAC$ shown in .

The length of the side $OC$ is $\vert a\vert \cos(\theta )$ and thus $a\cdot b$ is equal to the product of the lengths of sides $OC$ and $OB$, if (1) is correct which remains to be shown.

We will refer to $OC$ as the projection of $OA$ onto $OB$, considered as vectors, and thuswe may say that $a\cdot b$ is equal to the product of the length of the projection of $OA$onto $OB$ and the length of $OB$. Because of the symmetry, we may also relate $a\cdot b$ to the projection of $\latex OB$ onto $OA$, and conclude that $a\cdot b$ is also equal to the product of the length of the projection of $\latex OB$ onto $OA$ and the length of $OA$:

$a\cdot b=\vert a\vert,\vert b\vert\cos(\theta)$.

To prove (1), we write using the polar representation

• $a=(a1, a2)=\vert a\vert (\cos(\alpha ),\sin(\alpha ))$
• $b=(b1, b2)=\vert b\vert (\cos(\beta ),\sin(\beta ))$,

where α is the angle of the direction of a and β is the angle of direction of b. Using a basic trigonometric formula (from Chapter Pythagoras and Euclid), we see that

• $a\cdot b=a_1b_1+a_2b_2=\vert a\vert\vert b\vert (\cos(\alpha )\cos(\beta )+sin(\alpha )\sin(\beta ))$
• $= latex \vert a\vert \vert b\vert\cos(\alpha -\beta ) =\vert a\vert\vert b\vert\cos(\theta )$,

where $\latex \theta =\alpha -\beta$ is the angle between a and b.

Note that since $\cos(\theta )=cos(-\theta )$, we may compute the angle between a and b as $\alpha -\ beta$ or $\beta -\alpha$.

We may thus view $\vert b\vert\vert \cos(\theta )\vert$ as the length of the projection of the vector b in the direction of a, as shown in this figure:

Projection of b in the direction of a denoted $P_ab$ of length $\vert b\vert\cos(\theta )$.

For more see Descartes World of Analytic Geometry.