# 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*(Milne, The House at Pooh Corner)**thinking**– you and I must do it.

# 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 *points*, *straight lines*, *triangles* and *circles* in the plane.

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 where and are rational numbers, and is the set of all ordered pairs of rational numbers.

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

The troubles are resolved by using *real numbers*, that is by extending to where 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 , 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 and we finally generalize to analytic geometry in , where the dimension $n$ can be any natural number.

Considering with $nge 4$ leads to {em 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 will be of fundamental use in the generalizations to geometry in and 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 Method*contained 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 angle at a point referred to as the *origin.* One of the lines is called the -axis and the other the -axis, and each line is a copy of the real line . The *coordinates *of a given point in the plane is the ordered pair of real numbers , where corresponds to the intersection of the -axis with a line through parallel to the -axis, and corresponds to the intersection of the -axis with a line through parallel to the -axis. The coordinates of the origin are .

In this way, we identify each point in the plane with its coordinates , and we may thus represent the Euclidean plane as , where is the set of ordered pairs of real numbers $a_1$ and $a_2$. That is

- .

We have already used $R^2$ as a coordinate system above when plotting a function $f:Rrightarrow R$,where pairs of real numbers are represented as geometrical points in a Euclidean plane on a book-page.

To be more precise, we can identify the Euclidean plane with $bbR^2$, 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 -axis is horizontal and increasing to the right, and the $x_2$-axis is obtained rotating the $x_1$ axis by $90^circ$, 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 $a_2$ 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 .

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 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 , 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 to describe that the temperature is C and the air pressure millibar. We then describea certain weather situation as an ordered pair of numbers, such as .

Of course the *order* of the two numbers is critical for the interpretation. A weather situation described by the pair with temperature $1013$ and pressure , is certainlyvery different from that described by with temperature $latrex 27$ and pressure .

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 .

In another example related to the weather, we could agree to write to describe that the current wind is m/s and headed North-North-East (and coming from South-South-East. Now, is not a real number, so in order to couple to , we replace by the corresponding angle, that is by 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 . We could say that is the “amount of East”, and is the “amount of North” of the wind velocity, while we may say that the wind *speed* is , where we think of the speed as the “absolute value” of the wind *velocity* . 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 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 beindex{vector} 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 as a * point * in with coordinates and . We may write for short, and say that is the first coordinate of the point and the second coordinate of $a$.

We shall also interpret an ordered pair $(a_1,a_2)in R^2$ in a alternative way, namely as an *arrow *with tail at the origin and the head at the point :

A vector with tail at the origin and the head at the point

With the arrow interpretation of , we refer to as a *vector*. Again, we agree to write , and we say that and are the *components* of the arrow/vector . We say that is the *first component*, occurring in thefirst place and $a_2$ the *second component* occurring in the second place.

We thus may interpret an ordered pair in $bbR^2$ in two ways:

- as a point with coordinates ,
- as an arrow/vector with components starting at the origin and ending at the point .

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 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 fantasywhen we go into applications to mechanics below.

Sometimes vectors like are marked by boldface or an arrow, like or or , 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 as a scalar number, or vector or something else.

# Vector Addition

We now proceed to define *addition of vectors* in , and *multiplication of vectors* in $bbR^2$ *by real numbers*. In this context, we interpret as a set of vectors represented by arrowswith tail at the origin.

Given two vectors and in , we use $a+b$ to denote the vector in obtained by adding the components separately. We call the *sum* of and obtained through *vector addition*. Thus if and are given vectors in , then

- ,

which says that vector addition is carried out by adding components separately. We note that since and . We say that is the *zero vector* since for any vector . Note the difference between the *vector* zero and its two zero components, which are usually scalars

**Example**: We have and .

# Vector Addition and the Parallelogram Law

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

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

This definition of vector addition implies that we may reach the point by walking along arrows in two different ways.

First, we simply follow the arrow to its head, corresponding to walking along the diagonal of the parallelogram formed by and .

Secondly, we could follow the arrow from the origin to its head at the point and then continue to the head of the arrow parallel to $b$ and of equal length as with tail at .

Alternative, we may follow the arrow $b$ from the origin to its head at the point and then continue to the head of the arrow parallel to $a$ and of equal length as with tail at .

The three different routes to the point $(a_1+b_1,a_2+b_2)$ are displayed in the above figure.

We sum up in the following theorem:

**Theorem:** Adding two vectors and in to getthe sum corresponds to adding the arrows and using theParallelogram Law.

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

- ,

# Multiplication of a Vector by a Real Number

Given a real number and a vector , we definea new vector $lambda ain R^2$ by

- .

For example, . We say that is obtained by *multiplying* the vector by the real number $lambda$ 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 and . We note that . We give an example:

The sum of the multiples and of $a$ and $b$.

# The Norm of a Vector

We define the *Euclidean norm * of a vector as

- .

By Pythagoras theorem, the Euclidean norm of the vector is equal tothe length of the hypothenuse of the right angled triangle with sides and . In other words, the Euclidean norm Euclidean norm of the vector is equal to the distance from the origin to the point , or simply the length of the arrow .

We have

- if $lambdain R$ and $ain R^2$;

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

The zero vector 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 below, such as or . We used in the definition of Lipschitz continuity of above.

**Example**: If then , and .

# Polar Representation of a Vector

The points in $R^2$ with , correspondingto the vectors $a$ 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 on the unit circle can be written for someangle $theta$, which we refer to as the *angle of direction *or *direction* of the vector $a$. This follows from the definition of and in Chapter Pythagoras and Euclid.

Any vector can be expressed as

- ,

where is the norm of , is a vector of length one, and is the angle of direction of , see fref{R2radiusvectors}. This is the *polar representation* of . We call the direction of and the length of $a$:

Vectors $a$ of length $r$ are given by where .}label{R2radiusvectors}

We see that if , where and , then has the same direction as . If then has the opposite direction. In both cases,the norms change with the factor ; we have .

If , where $lambdaneq 0$ and $aneq 0$, then we say that the vector is {em parallel to} . Two parallel vectors have the same or opposite directions.

**Example**: We have

- ,

# Standard Basis Vectors

We refer to the vectors and as the *standard basis vector*s in $R^2$. A vector can be expressed in term of the basis vectors and as

- ,

since

- .

as illustrated in:

The standard basis vectors and and a linear combination of and .

We say that is a *linear combination*} of and with *coefficients * and . Any vector in $R^2$ can thus be expressed asa linear combination of the basis vectors and with the coordinates and as coefficients.

**Example**: We have .

# 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 and in $R^2$, we define their*scalar product* by

- .

We note, as the terminology suggests, that the scalar product of two vectors and in is a *scalar*, that is a number in , while the factors and are *vectors* in $R^2$. 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:

- .

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 , we may also view the vector product to be a single real number. However, the vector product in is indeed a vector in . (Of course, there is also the (trivial) “componentwise” vector product like mat lab’s .)

We may view the scalar product as a function $f:R^2\times R^2\rightarrow R$ where .

To each pair of vectors $a\in R^2$ and $b\in bbR^2$, we associate the number .

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

Here, $R^2\times R^2$ denotes the set of all ordered pairs of vectors and in $R^2$, of course.

**Example**: We have , and $\latex (3,7)\cdot (3,7)=9+49=58$ so that .

# Properties of the Scalar Product

The scalar product in $R^2$ is *linear* in each of the *arguments* and , that is

- ,
- ,
- ,

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

- .

Using the notation , the linearity properties may be written as

- ,
- .

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

Furthermore, the scalar product is *symmetric *in the sense that

- ,

and *positive definite*, that is

- .

We may summarize by saying that the scalar product is a *bilinear symmetric positive definite* form on .

We notice that for the basis vectors and , we have

- .

Using these relations, we can compute the scalar product of two arbitrary vectors and in $R^2$ using the linearity as follows:

- =a_1b_1,e_1cdot e_1+ a_1b_2,e_1cdot e_2+a_2b_1,e_2cdot e_1+a_2b_2,e_2\cdot e_2=a_1b_1+a_2b_2$.

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, see {Geometric Interpretation of the Scalar Product}label{geomintscalprod}

We shall now prove that the scalar product of two vectors and in can be expressed as

- , (1)

where is the angle between the vectors and .

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 shown in .

The length of the side is and thus is equal to the product of the lengths of sides and , if (1) is correct which remains to be shown.

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

.

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

- ,

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

- ,

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

Note that since $\cos(\theta )=cos(-\theta )$, we may compute the angle between and 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 in the direction of , as shown in this figure:

Projection of in the direction of denoted of length

We will come back to the important concept of projection in more detail below.

# Orthogonality and Scalar Product

We say that two non-zero vectors and in are *geometrically orthogonal*which we write as , if the angle between the vectors is or .

The basis vectors and are examples of geometrically orthogonal vectors:

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

epsfig{file=LA_R2orthogonality.eps,height=5cm}

caption{Orthogonal vectors $a$ and $b$.}

label{R2orthogonality}

end{center}

end{figure}

Let $a$ and $b$ be two non-zero vectors making an angle $theta$.

From eref{adotbeq}, we have $acdot b=vert avert vert bvertcos(theta )$

and thus $acdot b=0$ if and only if $cos(theta )=0$, that is,

if and only if $theta =90^circ$ or $theta =270^circ$. We have now proved the following

basic result, which we state as a theorem.

begin{theorem}

Two non-zero vectors $a$ and $b$ are geometrically orthogonal

if and only if $acdot b=0$.

end{theorem}

This result fits our experience in the

chapter Pythagoras and Euclid, where we saw that the angle $OAB$

formed by two line segments extending from the origin $O$ out to the points $A=(a_1,a_2)$ and $B=(b_1,b_2)$ respectively

is a right angle if and only if

begin{equation*}

a_1b_1+a_2b_2=0.

end{equation*}

Summing up, we have translated the

{em geometric} condition of two vectors $a=(a_1,a_2)$

and $b=(b_1,b_2)$ being geometrically orthogonal

to the {em algebraic} condition

$acdot b= a_1b_1+a_2b_2=0$.

Below, in a more general context we will turn this around and

{em define} two vectors $a$ and $b$ to be {em orthogonal}

if $acdot b=0$, where $acdot b$ is the scalar product of $a$ and $b$.

We have just seen that this algebraic definition of orthogonality

may be viewed as an extension of our intuitive idea of geometric orthogonality

in $bbR^2$. This follows the basic principle of analytic geometry

of expressing geometrical relations in algebraic terms.

%subsubsection{Alternative}

%To see this, we first write $a=vert averthat a=vert avert (hat a_1,hat a_2)$

%and $a=vert averthat a=vert avert (hat a_1,hat a_2)$, where

%$vert hat avert =vert hat bvert =1$. The relation eref{perp} can then

%be stated

%[

%vert avertvert bvert (hat a_1hat b_1+hat a_2hat b_2)=0.

%]

%that is since $vert avertvert bvertneq 1$,

%[

%hat a_1hat b_1+hat a_2hat b_2)=0

%]

%Writing

%$(hat a_1,hat a_2)=(cos(alpha ),sin(alpha )$ and

%$(hat b_1,hat b_2)=(cos(beta ),sin(beta )$ for some $alpha$ and $beta$ in

%$[0,2pi )$, we thus have that the equation $a_1b_1+a_2b_2=0$ can be stated

%begin{equation}label{cosformula}

%=cos(alpha )cos(beta )+sin(alpha )sin(beta )=cos(alpha -beta )

%end{equation}

%where we used the trigonometric formula eref{trigform2}. It follows

%that $alpha$ and $beta$ have to

%differ $pi /2$, since $cos (alpha -beta)$ vanishes only then,

%and thus we have proved the desired claim.

section{Projection of a Vector onto a Vector}

The concept of {em projection}index{projection} is basic in linear algebra.

We will now meet this concept

for the first time and will use it in many different contexts below.

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

mypsfrag{c}{$c$}

mypsfrag{d}{$d$}

epsfig{file=LA_R2orthodecomp.eps,height=5cm}

caption{Orthogonal decomposition of $b$}

label{R2orthodecomp}

end{center}

end{figure}

Let $a=(a_1,a_2)$ and $b=(b_1,b_2)$ be two non-zero vectors and consider the following

fundamental problem: Find vectors $c$ and $d$ such that $c$ is parallel to $a$, $d$ is

orthogonal to $a$, and $c+d=b$, see fref{R2orthodecomp}.

We refer to $b=c+d$

as an {em orthogonal decomposition}index{orthogonal decomposition} of $b$.

We refer to the vector $c$ as {em the projection of $b$ in the direction of $a$},

or the {em projection of $b$ onto $a$}, and we use the notation

$P_a(b)=c$. We can then express the decomposition of $b$ as $b=P_a(b)+(b-P_a(b))$,

with $c=P_a(b)$ and $d=b-P_a(b)$. The following

properties of the decomposition are immediate:

begin{gather*}

P_a(b)=lambda aquadmbox{for some }lambdainbbR ,

(b-P_a(b))cdot a=0.

end{gather*}

Inserting the first equation into the second, we get the equation

$(b-lambda a)cdot a=0$ in $lambda$,

which we solve to get

begin{equation*}

lambda =frac{bcdot a}{acdot a}=frac{bcdot a}{vert avert^2},

end{equation*}

and conclude that the projection $P_a(b)$ of $b$ onto $a$ is given by

begin{equation}label{projbontoaR2}

P_a(b)=frac{bcdot a}{vert avert^2},a.

end{equation}

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

mypsfrag{theta}{$theta$}

mypsfrag{Pb}{$P_a(b)$}

mypsfrag{|Pb|=|b||cos(theta)|=|b.a|/|a|}{$|P_a(b)|=|b|,|cos(theta)|=|bcdot a|/|a|$}

epsfig{file=LA_R2projection2.eps,height=5cm}

caption{The projection $P_a(b)$ of $b$ onto $a$.}

label{R2projection2}

end{center}

end{figure}

We compute the length of $P_a(b)$ as

begin{equation}

vert P_a(b)vert =frac{vert acdot bvert}{vert avert^2}vert avert

=frac{vert avert,vert bvert,vert cos(theta)vert }{vert avert}

=vert bvert vert cos(theta )vert,

end{equation}

where $theta$ is the angle between

$a$ and $b$, and we use eref{adotbeq}. We note that

begin{equation}label{modadotb}

vert acdot bvert =vert avert, vert Pbvert ,

end{equation}

which conforms with our experience with the scalar product

in Section ref{geomintscalprod}, see also Fig. 20.15.

We can view the projection $P_a(b)$ of the vector $b$ onto the

vector $a$ as a transformation of $bbR^2$ into $bbR^2$: given the

vector $bin bbR^2$, we define the vector $P_a(b)in bbR^2$ by the

formula

begin{equation}

P_a(b)=frac{bcdot a}{vert avert^2},a.

end{equation}

We write for short $Pb=P_a(b)$, suppressing the dependence on $a$ and the parenthesis,

and note that the mapping $P:bbR^2rightarrowbbR^2$ defined by $xrightarrow Px$ is linear. We have

begin{equation}

P(x+y)=Px+Py,quad P(lambda x)=lambda Px,

end{equation}

for all $x$ and $y$ in $bbR^2$ and $lambdainbbR$ (where we changed name of

the independent variable from $b$ to $x$ or $y$), see fref{projislinear}.

We note that $P(Px)=Px$ for all $xinbbR^2$. This could also be expressed as

$P^2=P$, which is a characteristic property of a projection. Projecting a second

time doesn’t change anything!

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{x}{$x$}

mypsfrag{lambdax}{$lambda x$}

mypsfrag{Px}{$Px$}

mypsfrag{P(lambdax)=lambdaPx}{$P(lambda x)=lambda Px$}

epsfig{file=projislinear.eps,height=5cm}

caption{$P(lambda x)=lambda Px$.}

label{projislinear}

end{center}

end{figure}

We sum up:

begin{theorem} The projection $xrightarrow Px=P_a(x)$ onto a given nonzero vector

$ainbbR^2$ is a linear mapping $P:bbR^2rightarrowbbR^2$ with the property that $PP=P$.

end{theorem}

begin{example} If $a=(1,3)$ and $b=(5,2)$, then $P_a(b)=frac{(1,3)cdot (5,2)}{1+3^2}(1,3)$ $=(1.1,3.3)$.

end{example}

section{Rotation by $90^circ$}

We saw above that to find the orthogonal decomposition $b=c+d$

with $c$ parallel to a given vector $a$, it suffices to find $c$ because $d=b-c$. Alternatively, we could seek to

first compute $d$ from the requirement that it should be orthogonal to $a$.

We are thus led to the problem of finding a direction orthogonal to a given direction,

that is the problem of rotating a given vector by $90^circ$, which we now address.

Given a vector $a=(a_1,a_2)$ in $bbR^2$, a quick computation

shows that the vector $(-a_2,a_1)$ has the desired property, because computing its scalar product with $a=(a_1,a_2)$ gives

begin{equation*}

(-a_2,a_1)cdot(a_1,a_2)=(-a_2)a_1+a_1a_2=0,

end{equation*}

and thus $(-a_2,a_1)$ is orthogonal to $(a_1,a_2)$.

Further, it follows directly that the vector $(-a_2,a_1)$ has the same length as $a$.

Assuming that $a=vert avert (cos(alpha ),sin(alpha ))$ and using the facts that

$-sin (alpha )=cos (alpha +90^circ)$ and

$cos (alpha )=sin (alpha +90^circ)$, we see that

the vector $(-a_2,a_1)=vert avert (cos (alpha +90^circ),

sin (alpha +90^circ))$ is obtained by rotating the vector $(a_1,a_2)$

counter-clockwise $90^circ$, see fref{R2orthogonality2}.

Similarly, the vector

$(a_2,-a_1)=-(-a_2,a_1)$ is obtained by clockwise rotation of $(a_1,a_2)$ by

$90^circ$.

begin{figure}[htbp]

begin{center}

mypsfrag{(a1,a2)}{$(a_1,,a_2)$}

mypsfrag{(-a2,a1)}{$(-a_2,,a_1)$}

epsfig{file=LA_R2orthogonality2.eps,height=5cm}

caption{Counter-clockwise rotation of $a=(a_1,a_2)$ by $90^circ$.}

label{R2orthogonality2}

end{center}

end{figure}

We may view the counter clockwise rotation of a vector by $90^circ$ as

a {em transformation} of vectors: given a vector $a=(a_1,a_2)$, we obtain

another vector $a^perp =f(a)$ through the formula

begin{equation*}

a^perp=f(a)=(-a_2,a_1),

end{equation*}

where we denoted the image of the vector $a$ by both $a^perp$ and $f(a)$.

The transformation $arightarrow a^perp =f(a)$ defines a linear function $f:bbR^2rightarrow bbR^2$ since

begin{gather*}

f(a+b)=(-(a_2+b_2),a_1+b_1)=(-a_2,a_1)+(-b_2,b_1)=f(a)+f(b),

f(lambda a)=(-lambda a_2,lambda a_1)=lambda (-a_2,a_1)=lambda f(a).

end{gather*}

To specify the action of $arightarrow a^perp =f(a)$

on an arbitrary vector $a$, it suffices to specify the action

on the basis vectors $e_1$ and $e_2$:

begin{equation*}

e_1^perp =f(e_1)=(0,1)=e_2,quad e_2^perp =f(e_2)=(-1,0)=-e_1,

end{equation*}

since by linearity, we may compute

begin{gather*}

a^perp =f(a)=f(a_1e_1+a_2e_2)=a_1f(e_1)+a_2f(e_2)

=a_1(0,1)+a_2(-1,0)=(-a_2,a_1).

end{gather*}

begin{example} Rotating the vector $(1,2)$ the angle $90^circ$ counter-clockwise, we get the vector

$(-2,1)$.

end{example}

section{Rotation by an Arbitrary Angle $theta $}

We now generalize to counter-clockwise rotation by an arbitrary angle $theta$.index{rotation}

Let $a=vert avert (cos(alpha ),sin(alpha ))$ in $bbR^2$ be a given vector. We seek a vector $R_theta (a)$ in $bbR^2$ of equal length

obtained by rotating $a$ the angle $theta$ counter-clockwise. By the definition

of the vector $R_theta (a)$ as the vector

$a=vert avert (cos(alpha ),sin(alpha ))$ rotated by $theta $, we have

begin{equation*}

R_theta (a)=vert avert (cos(alpha +theta ) ,sin(alpha +theta )).

end{equation*}

Using the standard trigonometric formulas from Chapter Pythagoras and Euclid,

begin{gather*}

cos(alpha +theta ) =cos(alpha )cos(theta )-sin(alpha )sin(theta ),

sin(alpha +theta ) =sin(alpha )cos(theta )+cos(alpha )sin(theta ),

end{gather*}

we can write the formula for the rotated vector $R_theta (a)$ as

begin{equation}label{rotatheta}

R_theta (a)=(a_1cos(theta )-a_2sin(theta ),a_1sin(theta )+a_2cos(theta )).

end{equation}

We may view the counter-clockwise rotation of a vector by the angle $theta$ as

a {em transformation} of vectors: given a vector $a=(a_1,a_2)$, we obtain

another vector $R_theta (a)$ by rotation by $theta$ according to the above formula.

Of course, we may view this transformation as a function $R_theta :bbR^2rightarrowbbR^2$.

It is easy to verify that this function is linear.

To specify the action of $R_theta $

on an arbitrary vector $a$, it suffices to specify the action

on the basis vectors $e_1$ and $e_2$,

begin{equation*}

R_theta (e_1)=(cos(theta) ,sin(theta )), quad R_theta (e_2)=(-sin(theta ),cos(theta )).

end{equation*}

The formula eref{rotatheta} may then be obtained using linearity,

[

begin{split}

R_theta (a)&=R_theta (a_1e_1+a_2e_2)=a_1R_theta (e_1)+a_2R_theta (e_2)

&=a_1(cos(theta) ,sin(theta ))+a_2(-sin(theta ),cos(theta ))

&=(a_1cos(theta )-a_2sin(theta ),a_1sin(theta )+a_2cos(theta )).

end{split}

]

begin{example} Rotating the vector $(1,2)$ the angle $30^circ$, we obtain the vector

$(cos(30^circ )-2sin(30^circ ),sin(30^circ )+2cos(30^circ ))=(frac{sqrt{3}}{2}-1,frac{1}{2}+sqrt{3})$.

end{example}

section{Rotation by $theta$ Again!}label{rotationagain}

We present yet another way to arrive at eref{rotatheta} based on the idea

that the transformation $R_theta :bbR^2rightarrowbbR^2$ of counter-clockwise rotation

by $theta$ is defined by the following properties,

begin{equation}label{proprottheta}

mbox{(i)}quadvert R_theta (a)vert =vert avert ,

quadmbox{and}quad mbox{(ii)}quad R_theta (a)cdot a=cos(theta)vert avert^2.

end{equation}

Property (i) says that rotation preserves the length and (ii) connects the

change of direction to the scalar product. We now seek to determine $R_theta (a)$ from

(i) and (ii). Given $ainbbR^2$, we set $a^perp =(-a_2,a_1)$ and express $R_theta (a)$

as $R_theta (a)=alpha a+beta a^perp$ with appropriate real numbers $alpha$ and $beta$.

Taking the scalar product

with $a$ and using $acdot a^perp =0$, we find from (ii) that $alpha =cos(theta )$.

Next, (i) states that $vert avert^2=vert R_theta (a)vert^2=(alpha^2+beta^2)vert avert ^2$,

and we conclude that $beta =pmsin(theta )$ and thus finally $beta =sin(theta )$

using the counter-clockwise orientation. We conclude that

[

R_theta (a)=cos(theta )a+sin(theta )a^perp

=(a_1cos(theta )-a_2sin(theta ),a_1sin(theta )+a_2cos(theta )),

]

and we have recovered eref{rotatheta}.

section{Rotating a Coordinate System}

Suppose we rotate the standard basis vectors $e_1=(1,0)$ and $e_2=(0,1)$ counter-clockwise

the angle $theta$ to get the new vectors $hat e_1=cos(theta )e_1 +sin(theta )e_2$ and

$hat e_2=-sin(theta )e_1+cos(theta )e_2$. We may use $hat e_1$ and $hat e_2$ as an alternative

coordinate system, and we may seek the connection between the coordinates of a given vector

(or point) in the old and new coordinate system. Letting $(a_1,a_2)$ be the coordinates

in the standard basis $e_1$ and $e_2$, and $(hat a_1,hat a_2)$ the coordinates

in the new basis $hat e_1$ and $hat e_2$, we have

[

begin{split}

a_1e_1+a_2e_2&=hat a_1hat e_1+hat a_2hat e_2

&=hat a_1(cos(theta )e_1 +sin(theta )e_2)+hat a_2(-sin(theta )e_1+cos(theta )e_2)

&=(hat a_1cos(theta ) -hat a_2sin(theta ))e_1+(hat a_1sin(theta ) +hat a_2cos(theta ))e_2 ,

end{split}

]

so the uniqueness of coordinates with respect to $e_1$ and $e_2$ implies

begin{equation}label{roteehat}

begin{split}

a_1&=cos(theta )hat a_1 -sin(theta )hat a_2,

a_2&=sin(theta )hat a_1 +cos(theta )hat a_2.

end{split}

end{equation}

Since $e_1$ and $e_2$ are obtained by rotating $hat e_1$ and $hat e_2$ clockwise by the angle $theta$,

begin{equation}label{rotehate}

begin{split}

hat a_1&=cos(theta )a_1 +sin(theta )a_2,

hat a_2&=-sin(theta )a_1 +cos(theta )a_2.

end{split}

end{equation}

The connection between the coordinates with respect to the two coordinate systems is thus given by

eref{roteehat} and eref{rotehate}.

begin{example} Rotating $45^circ$ counter-clockwise gives the following relation between

new and old coordinates

[

hat a_1=frac{1}{sqrt{2}}(a_1 +a_2),quad hat a_2=frac{1}{sqrt{2}}(-a_1 +a_2).

]

end{example}

%How to remember the formula eref{rotatheta}?

section{Vector Product}

We now define the {em vector product}index{vector product}

$atimes b$ of two vectors $a=(a_1,a_2)$ and $b=(b_1,b_2)$ in $bbR^2$ by the formula

begin{equation}label{acrossprodb}

atimes b=a_1b_2-a_2b_1.

end{equation}

The vector product $atimes b$ is also referred to as the {em cross

product} because of the notation used (don’t mix up with the “$times$” in

the “product set” $bbR^2timesbbR^2$ which has a different meaning). The vector product or cross

product may be viewed as a function

$bbR^2timesbbR^2rightarrowbbR$. This function is bilinear

as is easy to verify, and {em anti-symmetric}, that is

begin{equation}label{antisym}

atimes b=-btimes a,

end{equation}

which is a surprising property for a product.

Since the vector product is bilinear, we can specify the action of the vector product on two arbitrary

vectors $a$ and $b$ by specifying the action on the basis vectors,

begin{equation}label{vectorprodbasis}

e_1times e_1=0,, e_2times e_2=0,, e_1times e_2=1, , e_2times e_1=-1.

end{equation}

Using these relations,

[

atimes b=(a_1e_1+a_2e_2)times (b_1e_1+b_2e_2)=a_1b_2e_1times e_2+a_2b_1e_2times e_1=

a_1b_2-a_2b_1e_2.

]

We next show that the properties of bilinearity and anti-symmetry in fact

determine the vector product in $bbR^2$ up to a constant.

First note that anti-symmetry and bilinearity imply

begin{multline*}

e_1times e_1+e_1times e_2=e_1times (e_1+e_2)=-(e_1+e_2)times e_1

=-e_1times e_1-e_2times e_1 .

end{multline*}

Since $e_1times e_2=-e_2times e_1$, we have $e_1times e_1=0$.

Similarly, we see that $e_2times e_2=0$. We conclude that

the action of the vector product on the basis vectors

is indeed specified according to eref{vectorprodbasis} up to a constant.

%We can summarize by stating that the vector product in $bbR^2$ is

%a bilinear anti-symmetric form on $bbR^2times bbR^2$, that is

%$atimes b$ is linear in both $a$ and $b$, and $atimes b=-btimes a$,

%and up to a constant determined by these properties.

We next observe that

begin{equation*}

atimes b=(-a_2,a_1)cdot (b_1,b_2)=a_1b_2-a_2b_1,

end{equation*}

which gives a connection between the vector product $atimes b$ and the scalar product $a^perpcdot b$

with the $90^circ$ counter-clockwise rotated vector $a^perp =(-a_2,a_1)$.

We conclude that the vector product $atimes b$ of two

nonzero vectors $a$ and $b$ is zero if and only if

$a$ and $b$ are parallel. We state this basic result as a theorem.

begin{theorem}

Two nonzero vectors $a$ and $b$ are parallel if and only if $atimes b=0$.

end{theorem}

We can thus check if two non-zero vectors $a$ and $b$

are parallel by checking if $atimes b=0$. This is another example of

translating a geometric condition (two vectors $a$ and $b$ being parallel) into

an algebraic condition ($atimes b =0$).

We now squeeze more information from the relation $atimes b= a^perpcdot b$ assuming

that the angle between $a$ and $b$ is $theta$ and thus the angle between $a^perp$ and $b$

is $theta +90^circ$:

[

begin{split}

vert atimes bvert &=vert a^perpcdot bvert =vert a^perpvertvert bvert,

vertcos(theta+fracpi{2})vert

&=vert avert,vert bvert,vertsin(theta)vert,

end{split}

]

where we use $vert a^perpvert =vert avert$ and

$vert cos (theta pm pi/2)vert =vert sin (theta )vert $. Therefore,

begin{equation}label{acrossbsin}

vert atimes bvert =vert avertvert bvert vert sin(theta )vert ,

end{equation}

where $theta =alpha -beta$ is the angle between $a$ and $b$,

see fref{R2crossmodulus}.

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

mypsfrag{theta}{$theta$}

mypsfrag{(-a2,a1)}{$(-a_2,,a_1)$}

epsfig{file=LA_R2crossmodulus.eps,height=5cm}

caption{Why $vert atimes bvert=vert avert,vert bvert,vertsin(theta)vert$.}

label{R2crossmodulus}

end{center}

end{figure}

We can make the formula eref{acrossbsin} more precise by removing the

absolute values around $atimes b$ and the sine factor if we adopt a suitable sign convention.

This leads to the following more developed version of eref{acrossbsin}, which

we state as a theorem, see fref{R2cross2}.

begin{theorem}

For two non-zero vectors $a$ and $b$,

begin{equation}label{acrossbsin1}

atimes b =vert avertvert bvert sin(theta ) ,

end{equation}

where $theta$ is the angle between $a$ and $b$ counted positive counter-clockwise and negative clockwise

starting from $a$.

end{theorem}

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

mypsfrag{theta}{$theta$}

epsfig{file=LA_R2cross2.eps,height=5cm}

caption{$atimes b=vert avert,vert bvertsin(theta)$ is negative here because the

angle $theta$ is negative.}

label{R2cross2}

end{center}

end{figure}

section{The Area of a Triangle with a Corner at the Origin}

Consider a triangle $OAB$ with corners at the origin $O$ and the

points $A=(a_1,a_2)$ and $B=(b_1,b_2)$ formed by the vectors $a=(a_1,a_2)$ and

$b=(b_1,b_2)$, see fref{R2triangle}. We say that the triangle $OAB$ is {em spanned} by the

vectors $a$ and $b$.

We are familiar with the formula that states that

the area of this triangle can be computed as the base $vert avert$ times

the height $vert bvertvert sin(theta )vert $ times the factor $frac{1}{2}$,

where $theta$ is the angle

between $a$ and $b$, see fref{R2triangle}. Recalling eref{acrossbsin}, we

conclude

begin{theorem}

begin{equation*}label{trianglearea}

mbox{Area}(OAB)=frac{1}{2}vert avert,vert bvert, vert sin(theta )vert

=frac{1}{2},vert atimes bvert .

end{equation*}

end{theorem}

begin{figure}[htbp]

begin{center}

mypsfrag{theta}{$theta$}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

mypsfrag{A}{$A$}

mypsfrag{B}{$B$}

mypsfrag{O}{$O$}

mypsfrag{|b|sin(theta)}{$|b|sin(theta)$}

epsfig{file=LA_R2triangle.eps,height=5cm}

caption{The vectors $a$ and $b$ span a triangle with area $frac12vert atimes bvert$.}

label{R2triangle}

end{center}

end{figure}

The area of the triangle $OAB$ can be computed using the vector product

in $bbR^2$.

section{The Area of a General Triangle}

Consider a triangle $CAB$ with corners at the points $C=(c_1,c_2)$, $A=(a_1,a_2)$

and $B=(b_1,b_2)$. We considerindex{area!of triangle}

the problem of computing the area of the triangle $CAB$. We solved this problem above

in the case $C=O$ where $O$ is the origin. We may reduce the present case

to that case by changing coordinate system as follows. Consider a

new coordinate system with origin at $C=(c_1,c_2)$ and with a $hat x_1$-axis parallel to the $x_1$-axis

and a $hat x_2$-axis parallel to the $x_2$-axis, see fref{R2triangle2}.

begin{figure}[htbp]

begin{center}

mypsfrag{O}{$O$}

mypsfrag{x1}{$x_1$}

mypsfrag{x2}{$x_2$}

mypsfrag{hatx1}{$hat x_1$}

mypsfrag{hatx2}{$hat x_2$}

mypsfrag{a-c}{$ahskip-1mm-hskip-1mm c$}

mypsfrag{b-c}{$bhskip-1mm-hskip-1mm c$}

mypsfrag{C=(c1,c2)}{$C=(c_1,c_2)$}

mypsfrag{A=(a1,a2)}{$A=(a_1,a_2)$}

mypsfrag{B=(b1,b2)}{$B=(b_1,b_2)$}

mypsfrag{theta}{$theta$}

epsfig{file=LA_R2newcoords.eps,height=5cm}

caption{Vectors $a-c$ and $b-c$ span triangle with area $frac12vert (a-c)times (b-c)vert$.}

label{R2triangle2}

end{center}

end{figure}

Letting $(hat a_1,hat a_2)$ denote the coordinates with respect to the new coordinate system,

the new are related to the old coordinates by

begin{equation*}

hat a_1=a_1-c_1,quad hat a_2=a_2-c_2.

end{equation*}

The coordinates of the points $A$, $B$ and $C$ in the new coordinate system are thus

$(a_1-c_1,a_2-c_2)=a-c$, $(b_1-c_1,b_2-c_2)=b-c$ and $(0,0)$. Using the result from the previous section,

we find the area of the triangle

$CAB$ by the formula

begin{equation}label{areaABC}

mbox{Area}(CAB)=frac{1}{2}vert (a-c)times (b-c) vert .

end{equation}

begin{example} The area of the triangle with coordinates at $A=(2,3)$, $B=(-2,2)$

and $C=(1,1)$, is given by $mbox{Area}(CAB)=frac{1}{2}vert (1,2)times (-3,1)vert =frac{7}{2}$.

end{example}

section{The Area of a Parallelogram Spanned by Two Vectors}

The area of the parallelogram

spanned by $a$ and $b$, as shown in fref{R2cross}, is equal

to $vert atimes bvert$

since the area of the parallelogram is twice the area of the triangle spanned by $a$ and $b$.

Denoting the area of the parallelogram

spanned by the vectors $a$ and $b$ by $V(a,b)$, we thus have the formula

begin{equation}label{Aab}

V(a,b)=vert atimes bvert .

end{equation}

This is a fundamental formula which has important generalizations to $bbR^3$ and $bbR^n$.

begin{figure}[htbp]

begin{center}

mypsfrag{a}{$a$}

mypsfrag{b}{$b$}

mypsfrag{theta}{$theta$}

mypsfrag{|b|sin(theta)}{$|b|sin(theta)$}

epsfig{file=LA_R2cross.eps,height=5cm}

caption{The vectors $a$ and $b$ span a rectangle with area $vert atimes bvert=vert avert,vert bvert,sin(theta)vert$.}

label{R2cross}

end{center}

end{figure}

section{Straight Lines}

The points $x=(x_1,x_2)$ in the plane $bbR^2$ satisfying a relation

of the formindex{straight line}

begin{equation}

n_1x_1+n_2x_2=ncdot x=0 ,

end{equation}

where $n=(n_1,n_2)inbbR^2$ is a given non-zero vector,

form a straight line through the origin that is orthogonal to $(n_1,n_2)$, see fref{line}.

We say that $(n_1,n_2)$ is a {em normal} to the line.

We can represent the points $xinbbR^2$ on the line in

the form

begin{equation*}

x=sn^perp ,quad sinbbR ,

end{equation*}

where $n^perp =(-n_2,n_1)$ is orthogonal to $n$, see fref{line}.

We state this insight as a theorem because of its importance.

begin{theorem}

A line in $bbR^2$ passing through the origin

with normal $ninbbR^2$, may be expressed

as either the points $xinbbR^2$ satisfying $ncdot x=0$,

or the set of points of the form $x=sn^perp$ with $n^perpinbbR^2$ orthogonal to $n$

and $sinbbR$.

end{theorem}

begin{figure}[htbp]

begin{center}

mypsfrag{x}{$x$}

mypsfrag{n}{$n$}

mypsfrag{x1}{$x_1$}

mypsfrag{x2}{$x_2$}

mypsfrag{nperp}{$n^perp$}

mypsfrag{x=snperp}{$x=sn^perp$}

epsfig{file=LA_R2line.eps,height=5cm}

caption{Vectors $x=sa$ with $b$ orthogonal to a given vector $n$ generate a line through

the origin with normal $a$.}

label{line}

end{center}

end{figure}

Similarly, the set of points $(x_1,x_2)$ in $bbR^2$ such that

begin{equation}label{lined}

n_1x_1+n_2x_2=d,

end{equation}

where $n=(n_1,n_2)inbbR^2$ is a given non-zero vector and $d$ is a given constant,

represents a straight line that does not pass through the origin if $dneq 0$.

We see that $n$ is a normal to the line, since if $x$ and $hat x$ are two points

on the line then $(x-hat x)cdot n=d-d=0$, see fref{line2}.

We may define the line as the points $x=(x_1,x_2)$ in $bbR^2$,

such that the projection $frac{ncdot x}{vert nvert^2}n$

of the vector $x=(x_1,x_2)$ in the direction of $n$

is equal to $frac{d}{vert nvert^2}n$. To see this, we use the definition of the

projection and the fact $ncdot x=d$.

The line in fref{line} can also be represented as the set of points

begin{equation*}

x=hat x+sn^perpquad sinbbR ,

end{equation*}

where $hat x$ is any point on the line (thus satisfying $ncdot hat x=d$).

This is because any point $x$ of the form

$x=sn^perp +hat x$ evidently satisfies $ncdot x=ncdot hat x=d$.

We sum up in the following theorem.

begin{theorem} The set of points $xinbbR^2$ such that

$ncdot x=d$,

where $ninbbR^2$ is a given non-zero vector and $d$ is given constant,

represents a straight line in $bbR^2$. The line can also be expressed

in the form $x=hat x+sn^perp$ for $sinbbR$, where

$hat xinbbR^2$ is a point on the line.

end{theorem}

begin{figure}[htbp]

begin{center}

mypsfrag{O}{$O$}

mypsfrag{x1}{$x_1$}

mypsfrag{x2}{$x_2$}

mypsfrag{n}{$n$}

mypsfrag{nperp}{$n^perp$}

mypsfrag{hatx}{$hat x$}

mypsfrag{x=(x1,x2)}{$x=(x_1,,x_2)$}

epsfig{file=LA_R2line2.eps,height=5cm}

caption{The line through the point $hat x$ with normal $n$ generated by directional vector $a$.}

label{line2}

end{center}

end{figure}

begin{example} The line $x_1+2x_2=3$ can alternatively be expressed as the set of points $x=(1,1)+s(-2,1)$

with $sinbbR$.

end{example}

section{Projection of a Point onto a Line}

Let $ncdot x=d$ represent a line in $bbR^2$ and let $b$ be a point in $bbR^2$ that does

not lie on the line. We consider the problem of finding the point $Pb$ on the line which is

closest to $b$, see fref{projpointline}. This is called the

{em projection} of the point $b$ onto the line. Equivalently, we seek a

point $Pb$ on the line such that $b-Pb$ is orthogonal to the line,

that is we seek a point $Pb$ such that

index{projection!point onto a line}

begin{gather*}

ncdot Pb=dquad ( Pb,mbox{ is a point on the line}),

b-Pb mbox{ is parallel to the normal }n,

quad (b-Pb=lambda n,quadmbox{for some }lambdainbbR ).

end{gather*}

We conclude that $Pb=b-lambda n$ and the equation $ncdot Pb=d$ thus gives

$ncdot(b-lambda n)=d$, that is $lambda =frac{bcdot n-d}{vert nvert^2}$ and so

begin{equation}label{projpointline}

Pb=b-frac{bcdot n-d}{vert nvert^2},n.

end{equation}

If $d=0$, that is the line $ncdot x=d=0$ passes through the origin, then

(see prref{projpointplane0projba})

begin{equation}label{projpointline0}

Pb=b-frac{bcdot n}{vert nvert^2},n.

end{equation}

section{When Are Two Lines Parallel?}

Let

begin{equation*}

begin{array}{rcl}

a_{11}x_1+a_{12}x_2=b_1,

a_{21}x_1+a_{22}x_2=b_2,

end{array}

end{equation*}

be two straight lines in $bbR^2$ with

normals $(a_{11},a_{12})$ and $(a_{21},a_{22})$. How do we know if the lines are

parallel? Of course, the lines are parallel if and only if their normals are

parallel. From above, we know the normals are parallel

if and only if

begin{equation*}

(a_{11},a_{12})times (a_{21},a_{22})=a_{11}a_{22}-a_{12}a_{21}= 0,

end{equation*}

index{parallel!lines}

and consequently {em non}-parallel (and consequently intersecting at some point) if and only if

begin{equation}label{a11a12timesa21a22}

(a_{11},a_{12})times (a_{21},a_{22})=a_{11}a_{22}-a_{12}a_{21}neq 0,

end{equation}

begin{example} The two lines $2x_1+3x_2=1$ and $3x_1+4x_2=1$ are non-parallel because

$2cdot 4-3cdot 3=8-9=-1neq 0$.

end{example}

section{A System of Two Linear Equations in Two Unknowns}

If $a_{11}x_1+a_{12}x_2=b_1$

and $a_{21}x_1+a_{22}x_2=b_2$ are two straight lines in $bbR^2$ with

normals $(a_{11},a_{12})$ and $(a_{21},a_{22})$, then

their intersection is determined by the {em system of linear equations}index{system of linear equations}

begin{equation}label{2syst1}

begin{array}{rcl}

a_{11}x_1+a_{12}x_2=b_1,

a_{21}x_1+a_{22}x_2=b_2,

end{array}

end{equation}

which says that we seek a point $(x_1,x_2)inbbR^2$

that lies on both lines.

This is a {em system of two linear equations in two unknowns} $x_1$ and $x_2$,

or a $2times 2$-system. The numbers $a_{ij}$, $i,j=1,2$ are the {em coefficients}

of the system and the numbers $b_i$, $i=1,2,$ represent the given {em right hand side}.

If the normals $(a_{11},a_{12})$ and $(a_{21},a_{22})$ are not parallel or by eref{a11a12timesa21a22}, $a_{11}a_{22}-a_{12}a_{21}neq 0$,

then the lines must intersect and thus the system eref{2syst1}

should have a unique solution $(x_1,x_2)$. To determine $x_1$, we

multiply the first equation by $a_{22}$ to get

begin{equation*}

a_{11}a_{22}x_1+a_{12}a_{22}x_2=b_1a_{22}.

end{equation*}

We then multiply

the second equation by $a_{12}$,

to get

begin{equation*}

a_{21}a_{12}x_1+a_{22}a_{12}x_2=b_2a_{12}.

end{equation*}

Subtracting the two equations

the $x_2$-terms cancel and we get the following equation

containing only the unknown $x_1$,

begin{equation*}

a_{11}a_{22}x_1-a_{21}a_{12}x_1=b_1a_{22}-b_2a_{12}.

end{equation*}

Solving for $x_1$, we get

begin{equation*}

x_1=(a_{22}b_1-a_{12}b_2)(a_{11}a_{22}-a_{12}a_{21})^{-1}.

end{equation*}

Similarly to determine $x_2$, we multiply the first equation by $a_{21}$ and

subtract the second equation multiplied by $a_{11}$, which eliminates

$a_1$. Altogether, we obtain the solution formula

begin{subequations}label{sol2syst1}

begin{align}

x_1&=(a_{22}b_1-a_{12}b_2)(a_{11}a_{22}-a_{12}a_{21})^{-1},

x_2&=(a_{11}b_2-a_{21}b_1)(a_{11}a_{22}-a_{12}a_{21})^{-1}.

end{align}

end{subequations}

This formula gives the unique solution of eref{2syst1} under the condition

$a_{11}a_{22}-a_{12}a_{21}neq 0$.

%Strictly speaking, we have proved that a solution to eref{2syst1}

%with eref{a1crossa2neq0}, if it exists, is given by eref{sol2syst1}.

%The existence of a solution was motivated geometrically above,

%refering to the fact that the corresponding lines must have a (unique)

%intersection point, under the given assumption eref{a1crossa2neq0}.

%However, one may now also verify algebraicly, by direct computation,

%that indeed eref{sol2syst1} gives a solution to eref{2syst1}. The

%uniqueness then follows from the derivation of eref{sol2syst1}.

We can derive the solution formula eref{sol2syst1} in a different way, still

assuming that $a_{11}a_{22}-a_{12}a_{21}neq 0$.

We define $a_1=(a_{11},a_{21})$ and $a_2=(a_{12},a_{22})$, noting carefully that here

$a_1$ and $a_2$ denote {em vectors} and

that $a_1times a_2=a_{11}a_{22}-a_{12}a_{21}neq 0$,

%(Note the difference as compared to above where we took

%$a_1=(a_{11},a_{12})$ and $a_2=(a_{21},a_{22})$!)

and rewrite the two equations of the system eref{2syst1}

in vector form as

begin{equation}label{2syst2}

x_1a_1+x_2a_2=b.

end{equation}

Taking the vector product of this equation with

$a_2$ and $a_1$ and using $a_2times a_2=a_1times a_1=0$,

begin{equation*}

x_1a_1times a_2=btimes a_2, quad x_2a_2times a_1=btimes a_1 .

end{equation*}

Since $a_1times a_2neq 0$,

begin{equation}label{sol2syst2}

x_1=frac{btimes a_2}{a_1times a_2}, quad x_2=frac{btimes a_1}{a_2times a_1}=-frac{btimes a_1}{a_1times a_2} ,

end{equation}

which agrees with the formula eref{sol2syst1} derived above.

We conclude this section by discussing the case when $a_1times a_2=a_{11}a_{22}-a_{12}a_{21}=0$,

that is the case when $a_1$ and $a_2$ are parallel or equivalently

the two lines are parallel. In this case, $a_2=lambda a_1$ for some $lambdainbbR$ and the system

eref{2syst1} has a solution if and only if $b_2=lambda b_1$,

since then the second equation results from multiplying the first by $lambda$.

In this case there are infinitely many solutions since the two lines coincide.

In particular if we choose $b_1=b_2=0$, then the solutions consist of all $(x_1,x_2)$

such that $a_{11}x_1+a_{12}x_2=0$, which defines a straight line through the origin.

On the other hand if $b_2neq lambda b_1$, then the two equations represent two different

parallel lines that do not intersect and there is no solution to the

system eref{2syst1}.

We summarize our experience from this section on systems of 2 linear equations in 2

unknowns as follows:

begin{theorem} The system of linear equations $x_1a_1+x_2a_2=b$, where

$a_1,a_2$ and $b$ are given vectors in $bbR^2$, has a unique solution $(x_1,x_2)$ given

by eref{sol2syst2} if $a_1times a_2neq 0$. In the case

$a_1times a_2=0$,

the system has no solution or infinitely many solutions, depending on $b$.

end{theorem}

Below we shall generalize this result to systems of $n$ linear equations in $n$ unknowns,

which represents one of the most basic results of linear algebra.

begin{example} The solution to the system

[

begin{array}{rcl}

x_1+2x_2=3,

4x_1+5x_2=6,

end{array}

]

is given by

[

x_1=frac{(3,6)times (2,5)}{(1,4)times (2,5)}=frac{3}{-3}=-1,

quad x_2=-frac{(3,6)times (1,4)}{(1,4)times (2,5)}=-frac{6}{-3}=2.

]

end{example}

section{Linear Independence and Basis}

We saw above that the system eref{2syst1} can be written in vector form as

[

x_1a_1+x_2a_2=b,

]

where $b=(b_1,b_2)$, $a_1=(a_{11},a_{21})$ and $a_2=(a_{12},a_{22})$

are all vectors in $bbR^2$, and $x_1$ and $x_2$ real numbers. We say that

begin{equation*}

x_1a_1+x_2a_2,

end{equation*}

is a {em linear combination} of the vectors $a_1$ and $a_2$, or

a linear combination of the set of vectors ${a_1,a_2}$,

with the coefficients $x_1$ and $x_2$ being real numbers.

The system of equations eref{2syst1} expresses the right hand side vector

$b$ as a linear combination of the set of vectors ${a_1,a_2}$

with the coefficients $x_1$ and $x_2$.

We refer to $x_1$ and $x_2$ as the {em coordinates} of

$b$ with respect to the set of vectors ${a_1,a_2}$, which we may

write as an ordered pair $(x_1,x_2)$.

The solution formula eref{sol2syst2} thus states that

if $a_1times a_2neq 0$,

then an arbitrary vector $b$ in $bbR^2$ can be expressed as a

linear combination

of the set of vectors ${a_1,a_2}$

with the coefficients $x_1$ and $x_2$ being uniquely

determined. This means that if $a_1times a_2neq 0$, then the

the set of vectors ${a_1,a_2}$ may

serve as a {em basis} for $bbR^2$, in the sense that each vector $b$

in $bbR^2$ may be uniquely

expressed as a linear combination $b=x_1a_1+x_2a_2$ of the set of vectors ${a_1,a_2}$.

We say that the ordered pair $(x_1,x_2)$ are the {em coordinates} of $b$

with respect to the basis ${a_1,a_2}$. The system of equations

$b=x_1a_1+x_2a_2$ thus give the coupling between the coordinates $(b_1,b_2)$

of the vector $b$ in the standard basis, and the coordinates $(x_1,x_2)$ with respect

to the basis ${a_1,a_2}$.

In particular, if $b=0$ then $x_1=0$ and $x_2=0$.

Conversely if $a_1times a_2=0$, that is $a_1$ and $a_2$ are parallel,

then any nonzero vector $b$ orthogonal to $a_1$ is also orthogonal

to $a_2$ and $b$ cannot be expressed as $b=x_1a_1 +x_2a_2$.

%(see prref{borta1a2}).

Thus, if $a_1times a_2=0$ then ${a_1,a_2}$

cannot serve as a basis. We have now proved the following basic theorem:

index{linear independence}index{basis}

begin{theorem}label{a1a2linindepbasis}

A set ${a_1,a_2}$ of two non-zero vectors $a_1$ and $a_2$

may serve as a basis for $bbR^2$ if and only if

if $a_1times a_2neq 0$. The coordinates $(b_1,b_2)$

of a vector $b$ in the standard basis and the coordinates $(x_1,x_2)$ of $b$ with respect

to a basis ${a_1,a_2}$ are related by the system of linear equations

$b=x_1a_1+x_2a_2$.

end{theorem}

begin{example} The two vectors $a_1=(1,2)$ and $a_2=(2,1)$ (expressed in the

standard basis) form a basis for

$bbR^2$ since $a_1times a_2=1-4=-3$. Let $b=(5,4)$ in the standard basis.

To express $b$ in the basis ${a_1,a_2}$, we seek real numbers

$x_1$ and $x_2$ such that $b=x_1a_1+x_2a_2$, and using the solution formula

eref{sol2syst2} we find that $x_1=1$ and $x_2=2$. The coordinates

of $b$ with respect to the basis ${a_1,a_2}$ are thus $(1,2)$,

while the coordinates of $b$ with respect to the standard basis are $(5,4)$.

end{example}

We next introduce the concept of {em linear independence},

which will play an important role below.

We say that a set ${a_1,a_2}$ of two non-zero vectors

$a_1$ and $a_2$ two non-zero vectors $a_1$ and $a_2$ in

$bbR^2$ is {em linearly independent} if the system of equations

begin{equation*}

x_1a_1+x_2a_2=0

end{equation*}

has the unique solution $x_1=x_2=0$. We just saw that

if $a_1times a_2neq 0$, then

$a_1$ and $a_2$ are linearly independent (because $b=(0,0)$ implies

$x_1=x_2=0$). Conversely if $a_1times a_2=0$,

then $a_1$ and $a_2$ are parallel so that $a_1=lambda a_2$ for some $lambdaneq 0$,

and then there are many possible choices of $x_1$ and $x_2$,

not both equal to zero, such that $x_1a_1+x_2a_2=0$,

for example $x_1=-1$ and $x_2=lambda$. We have thus proved:

begin{theorem} The set ${a_1,a_2}$ of non-zero vectors $a_1$ and $a_2$

is linearly independent if and only if $a_1times a_2neq 0$.

end{theorem}

begin{figure}[htbp]

begin{center}

mypsfrag{x1}{$x_1$}

mypsfrag{x2}{$x_2$}

mypsfrag{c1}{$c_1$}

mypsfrag{c2}{$c_2$}

mypsfrag{c=0.73c1+1.7c2}{$c=0.73c_1+1.7c_2$}

epsfig{file=LA_R2linind.eps,height=5cm}

caption{Linear combination $c$ of two linearly independent vectors $c_1$ and $c_2$}

label{linind}

end{center}

end{figure}

%Below we shall generalize these results first to $bbR^3$ and then to $bbR^n$

%for $n>3$.

%(An important part of linear algebra generalizes this result to

%systems of $n$ linear equations in $n$ unknowns, as we shall se below.)

%section{Examples of $2times 2$ linear systems from applications}

%2 ages, apples and pears

%begin{problem} Show that the two vectors $(a_{11},a_{12})$ and

%$a_{21},a_{22})$ are not parallel iff $a_{11}a_{22}-a_{12}a_{21}neq 0$.

%Hint: Note that $(a_{22},-a_{21})$ is perpendicular to $(a_{21},a_{22})$.

%end{problem}

section{The Connection to Calculus in One Variable}

We have discussed Calculus of real-valued

functions $y=f(x)$ of one real variable

$xinbbR$, and we have used a coordinate system in $bbR^2$ to plot

graphs of functions $y=f(x)$ with $x$ and $y$ representing the two

coordinate axis. Alternatively, we may specify the graph

as the set of points $(x_1,x_2)inbbR^2$, consisting of pairs $(x_1,x_2)$

of real numbers $x_1$ and $x_2$, such that

$x_2=f(x_1)$ or $x_2-f(x_1)=0$ with $x_1$ representing $x$

and $x_2$ representing $y$. We

refer to the ordered pair $(x_1,x_2)inbbR^2$ as a vector $x=(x_1,x_2)$

with components $x_1$ and $x_2$.

We have also discussed properties of linear functions

$f(x)=ax+b$, where $a$ and $b$ are real constants, the graphs

of which are straight lines $x_2=ax_1+b$ in $bbR^2$.

More generally, a straight line in $bbR^2$ is the set of points

$(x_1,x_2)inbbR^2$ such that $x_1a_1+x_2a_2=b$, where the $a_1$, $a_2$ and

$b$ are real constants, with $a_1neq 0$ and/or $a_2neq 0$. We have

noticed that $(a_1,a_2)$ may be viewed as a direction in $bbR^2$

that is perpendicular or normal to the line $a_1x_1+a_2x_2=b$, and

that $(b/a_1,0)$ or $(0,b/a_2)$ are the points where the line intersects the

$x_1$-axis and the $x_2$-axis respectively.

section{Linear Mappings $f:bbR^2rightarrow bbR$}

A function $f:bbR^2rightarrow bbR$ is {em linear}

if for any $x=(x_1,x_2)$ and $y=(y_1,y_2)$ in $bbR^2$

and any $lambda$ in $bbR$,

begin{equation}

f(x+y)=f(x)+f(y)quadmbox{and}quad f(lambda x)=lambda f(x).

end{equation}

Setting $c_1=f(e_1)inbbR$ and $c_2=f(e_2)inbbR$, where $e_1=(1,0)$ and $e_2=(0,1)$

are the standard basis vectors in $bbR^2$, we can represent

$f:bbR^2rightarrow bbR$ as follows:index{linear mapping}

begin{equation*}

f(x)=x_1c_1+x_2c_2=c_1x_1+c_2x_2,

end{equation*}

where $x=(x_1,x_2)inbbR^2$. We also refer to a linear function as a linear {em mapping}.

begin{example} The function $f(x_1,x_2)=x_1+3x_2$ defines a linear mapping

$f:bbR^2rightarrowbbR$.

end{example}

section{Linear Mappings $f:bbR^2rightarrow bbR^2$}

A function $f:bbR^2rightarrow bbR^2$ taking values $f(x)=(f_1(x),f_2(x))inbbR^2$

is {em linear} if the component functions $f_1:bbR^2rightarrow bbR$ and

$f_2:bbR^2rightarrow bbR$ are linear.

Setting $a_{11}=f_1(e_1)$, $a_{12}=f_1(e_2)$, $a_{21}=f_2(e_1)$,

$a_{22}=f_2(e_2)$,

we can represent $f:bbR^2rightarrow bbR^2$ as $f(x)=(f_1(x),f_2(x))$,

where

begin{subequations}label{fca}

begin{gather}

f_1(x)=a_{11}x_1+a_{12}x_2,

f_2(x)=a_{21}x_1+a_{22}x_2,

end{gather}

end{subequations}

and the $a_{ij}$ are real numbers.

A linear mapping $f:bbR^2rightarrowbbR^2$ maps (parallel)

lines onto (parallel) lines since for $x=hat x+sb$ and $f$ linear, we have

$f(x)=f(hat x+sb)=f(hat x)+sf(b)$, see fref{LA_R2lines2lines}.

begin{figure}[htbp]

begin{center}

mypsfrag{x1}{$x_1$}

mypsfrag{x2}{$x_2$}

mypsfrag{y1}{$y_1$}

mypsfrag{y2}{$y_2$}

mypsfrag{x=sb}{$x=s,b$}

mypsfrag{x=hatx+sb}{$x=hat x+s,b$}

mypsfrag{y=sf(b)}{$y=sf(b)$}

mypsfrag{y=f(hatx)+sf(b)}{$y=f(hat x)+sf(b)$}

epsfig{file=LA_R2lines2lines.eps,height=5cm}

caption{A linear mapping $f:bbR^2rightarrowbbR^2$ maps (parallel) lines to (parallel) lines, and consequently parallelograms to parallelograms.}

label{LA_R2lines2lines}

end{center}

end{figure}

begin{example} The function $f(x_1,x_2)=(x_1+3x_2,2x_1-x_3)$ defines a

linear mapping $bbR^2rightarrowbbR^2$.

end{example}

section{Linear Mappings and Linear Systems of Equations}

Let a linear mapping $f:bbR^2rightarrow bbR^2$ and a vector

$binbbR^2$ be given. We consider the problem of

finding $xinbbR^2$ such that

begin{equation*}

f(x)=b.

end{equation*}

Assuming $f(x)$ is represented by eref{fca},

we seek $xinbbR^2$ satisfying the $2times 2$ linear system of equations

begin{subequations}label{2by2syst}

begin{align}

a_{11}x_1+a_{12}x_2&=b_1,

a_{21}x_1+a_{22}x_2&=b_2,

end{align}

end{subequations}

where the coefficients $a_{ij}$ and the coordinates $b_i$ of the right hand side

are given.

section{A First Encounter with Matrices}

We write the left hand side of eref{2by2syst} as follows:

begin{equation}label{Cxa}

left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)

=

left(

begin{matrix}

a_{11}x_1+ a_{12}x_2

a_{21}x_1+ a_{22}x_2

end{matrix}

right).

end{equation}

The quadratic array

begin{equation*}

left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

end{equation*}

is called a $2times 2$ {em matrix}index{matrix}. We can view this

matrix to consist of two rows

begin{equation*}

left(

begin{matrix}

a_{11}& a_{12}

end{matrix}

right)

qquadmbox{and }quad

left(

begin{matrix}

a_{21}& a_{22},

end{matrix}

right)

end{equation*}

or two columns

begin{equation*}

left(

begin{matrix}

a_{11}

a_{21}

end{matrix}

right)

quadmbox{and }quad

left(

begin{matrix}

a_{12}

a_{22}

end{matrix}

right).

end{equation*}

Each row may be viewed as a $1times 2$ matrix with $1$ horizontal array with $2$ elements

and each column may be viewed as a $2times 1$ matrix with $1$ vertical array with

$2$ elements. In particular, the array

begin{equation*}

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)

end{equation*}

may be viewed as a $2times 1$ matrix. We also refer to

a $2times 1$ matrix as a 2-{em column vector}, and

a $1times 2$ matrix as a 2-{em row vector}. Writing $x=(x_1,x_2)$ we may view $x$ as

a $1times 2$ matrix or 2-row vector. Using matrix notation, it is most natural to view $x=(x_1,x_2)$

as a 2-column vector.

The expression eref{Cxa} defines the {em product} of a $2times 2$ matrix

and a $2times 1$ matrix or a $2$-column vector. The product can be interpreted

as

begin{equation}label{Cxa1}

left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)

=

left(

begin{matrix}

c_1cdot x

c_2cdot x

end{matrix}

right)

end{equation}

where we interpret $r_1=(a_{11},a_{12})$ and $r_2=(a_{21},a_{22})$ as the two ordered pairs

corresponding to the two rows of the matrix and $x$ is the ordered pair $(x_1,x_2)$.

The matrix-vector product is given by

begin{equation}label{Cxa2}

left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)

end{equation}

i.e. by taking the scalar product of the ordered pairs $r_1$ and $r_2$ corresponding to the

2-row vectors of the matrix with the order pair corresponding to the 2-column vector $x=left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)$.

Writing

begin{equation}label{Cxa3}

A=left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

quadmbox{and }

x=left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)

quadmbox{and }

b=left(

begin{matrix}

b_{1}

b_{2}

end{matrix}

right),

end{equation}

we can phrase the system of equations eref{2by2syst} in condensed form as

the following {em matrix equation:}

[

Ax=b,qquadmbox{or }quadleft(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right)

=left(

begin{matrix}

b_{1}

b_{2}

end{matrix}

right).

]

We have now got a first glimpse of matrices including the basic operation

of multiplication

of a $2times 2$-matrix with a $2times 1$ matrix or $2$-column vector.

Below we will generalize to a calculus for matrices including addition of

matrices, multiplication

of matrices with a real number, and multiplication of matrices. We will also

discover a form

of matrix division referred to as inversion of matrices allowing us to express

the solution of the system $Ax=b$ as $x=A^{-1}b$, under the condition that

the columns (or equivalently, the rows) of $A$ are linearly independent.

section{First Applications of Matrix Notation}

To show the usefulness of the matrix notation just introduced,

we rewrite some of the linear systems of equations and

transformations which we have met above.

subsection*{Rotation by $theta$}

The mapping $R_theta :bbR^2rightarrowbbR^2$ corresponding to rotation of

a vector by

an angle $theta$ is given by eref{rotatheta}, that is

begin{equation}label{rotatheta1}

R_theta (x)=(x_1cos(theta )-x_2sin(theta ),x_1sin(theta )+x_2cos(theta )).

end{equation}

Using matrix notation, we can write $R_theta (x)$ as follows

begin{equation*}

R_theta (x)=Ax=left(

begin{matrix}

cos(theta )& -sin(theta )

sin(theta )& cos(theta )

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right),

end{equation*}

where $A$ thus is the $2times 2$ matrix

begin{equation}label{Arotatheta}

A=left(

begin{matrix}

cos(theta )& -sin(theta )

sin(theta )& cos(theta )

end{matrix}

right).

end{equation}

subsection*{Projection Onto a Vector $a$}

The projection $P_a(x)=frac{xcdot a}{vert avert^2},a$

given by eref{projbontoaR2} of a vector $xinbbR^2$ onto a given vector

$ainbbR^2$index{projection} can be expressed

in matrix form as follows:

begin{equation*}

P_a(x)=Ax=left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right),

end{equation*}

where $A$ is the $2times 2$ matrix

begin{equation}label{proja}

A=left(

begin{matrix}

frac{a_1^2}{vert avert^2}& frac{a_1a_2}{vert avert^2}

frac{a_1a_2}{vert avert^2}& frac{a_2^2}{vert avert^2}

end{matrix}

right).

end{equation}

subsection*{Change of Basis}

The linear system eref{rotehate} describing a

change of basis can be written in matrix form as

begin{equation*}

left(begin{matrix}

hat x_{1}

hat x_{2}

end{matrix}

right)

=left(

begin{matrix}

cos(theta )& sin(theta )

-sin(theta )&cos(theta )

end{matrix}

right)

left(

begin{matrix}

x_{1}

x_{2}

end{matrix}

right),

end{equation*}

or in condensed from as $hat x=Ax$,

where $A$ is the matrix

begin{equation*}

A=left(

begin{matrix}

cos(theta )& sin(theta )

-sin(theta )&cos(theta )

end{matrix}

right)

end{equation*}

and $x$ and $hat x$ are $2$-column vectors.

%We now give an introduction to a calculus for $2times 2$ matrices.

section{Addition of Matrices}

Let $A$ be a given $2times 2$ matrix with elements $a_{ij}$, $i,j=1,2$,

that is

begin{equation*}

A=left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right).

end{equation*}

We write $A=(a_{ij})$. Let $B=(b_{ij})$ be another $2times 2$ matrix.

We define the sum $C=A+B$ to be the matrix $C=(c_{ij})$ with elements

$c_{ij}=a_{ij}+b_{ij}$ for $i,j=1,2$. In other words, we add two matrices

element by element:

begin{equation*}

A+B=left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

+

left(

begin{matrix}

b_{11}& b_{12}

b_{21}& b_{22}

end{matrix}

right)

=

left(

begin{matrix}

a_{11}+b_{11}& a_{12}+b_{12}

a_{21}+b_{21}& a_{22}+b_{22}

end{matrix}

right)

=C.

end{equation*}index{matrix addition}

section{Multiplication of a Matrix by a Real Number}

Given a $2times 2$ matrix $A$ with elements $a_{ij}$, $i,j=1,2$,

and a real number $lambda$,

we define the matrix $C=lambda A$ as the matrix with elements

$c_{ij}=lambda a_{ij}$. In other words, all elements $a_{ij}$

are multiplied by $lambda$:

begin{equation*}

lambda A=

lambdaleft(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

=

left(

begin{matrix}

lambda a_{11}& lambda a_{12}

lambda a_{21}& lambda a_{22}

end{matrix}

right)

= C.

end{equation*}

section{Multiplication of Two Matrices}

Given two $2times 2$ matrices $A=(a_{ij})$ and $B=(b_{ij})$ with elements, we define the product

$C=AB$ as the matrix with elements $c_{ij}$

given by

begin{equation*}

c_{ij}=sum_{k=1}^2a_{ik}b_{kj}.

end{equation*}

Writing out the sum, we have

begin{multline*}

AB=left(

begin{matrix}

a_{11}& a_{12}

a_{21}& a_{22}

end{matrix}

right)

left(

begin{matrix}

b_{11}& b_{12}

b_{21}& b_{22}

end{matrix}

right)

=

left(

begin{matrix}

a_{11}b_{11}+a_{12}b_{21}& a_{11}b_{12}+a_{12}b_{22}

a_{21}b_{11}+a_{22}b_{21}&a_{21}b_{12}+a_{22}b_{22}

end{matrix}

right)

=C.

end{multline*}

In other words, to get the element $c_{ij}$ of the product $C=AB$,

we take the scalar product of

row $i$ of $A$ with column $j$ of $B$.

The matrix product is generally non-commutative so that $ABneq BA$ most of

the time.

index{matrix multiplication}

We say that in the product $AB$ the matrix $A$ multiplies the matrix $B$

from the left and that $B$ multiplies the matrix $A$

from the right. Non-commutativity of matrix multiplication

means that multiplication from right or left may give different results.

%subsubsection{Computing $BB$ if $B$ is a projection matrix}

begin{example} We have

[

left(begin{matrix}

1& 2

1& 1

end{matrix}

right)

left(begin{matrix}

1& 3

1& 1

end{matrix}

right)

=left(begin{matrix}

3& 5

2& 4

end{matrix}

right),quadmbox{while }quad

left(begin{matrix}

1& 3

1& 1

end{matrix}

right)

left(begin{matrix}

1& 2

1& 1

end{matrix}

right)

=left(begin{matrix}

4& 5

2& 3

end{matrix}

right).

]

end{example}

begin{example}

We compute $BB=B^2$, where $B$ is the projection matrix given by

eref{proja}, that is

begin{equation*}

B=left(begin{matrix}

frac{a_1^2}{vert avert^2}& frac{a_1a_2}{vert avert^2}

frac{a_1a_2}{vert avert^2}& frac{a_2^2}{vert avert^2}

end{matrix}

right)

=

frac{1}{vert avert^2}left(begin{matrix}

a_1^2& a_1a_2

a_1a_2& a_2^2

end{matrix}

right).

end{equation*}

We have

begin{equation*}

BB=frac{1}{vert avert^4}left(begin{matrix}

a_1^2& a_1a_2

a_1a_2& a_2^2

end{matrix}

right)

left(begin{matrix}

a_1^2& a_1a_2

a_1a_2& a_2^2

end{matrix}

right)

end{equation*}

begin{equation*}

=frac{1}{vert avert^4}left(begin{matrix}

a_1^2(a_1^2+a_2^2)& a_1a_2(a_1^2+a_2^2)

a_1a_2(a_1^2+a_2^2)& a_2^2(a_1^2+a_2^2)

end{matrix}

right)

=

frac{1}{vert avert^2}left(begin{matrix}

a_1^2& a_1a_2

a_1a_2& a_2^2

end{matrix}

right)=B,

end{equation*}

and see as expected that $BB=B$.

end{example}

%subsubsection{Two successive rotations}

begin{example}

As another application we compute the product of

two matrices corresponding to two rotations with angles $alpha$ and $beta$:

begin{equation}label{Arotatheta2}

A=left(

begin{matrix}

cos(alpha )& -sin(alpha )

sin(alpha )& cos(alpha )

end{matrix}

right)

quadmbox{and }quad

B=left(

begin{matrix}

cos(beta )& -sin(beta )

sin(beta )& cos(beta )

end{matrix}

right).

end{equation}

We compute

begin{equation*}

AB=left(

begin{matrix}

cos(alpha )& -sin(alpha )

sin(alpha )& cos(alpha )

end{matrix}

right)

left(

begin{matrix}

cos(beta )& -sin(beta )

sin(beta )& cos(beta )

end{matrix}

right)

end{equation*}

begin{equation*}

left(

begin{matrix}

cos(alpha)cos(beta )-sin(alpha )sin(beta )& -cos(alpha )sin(beta )-sin(alpha )cos(beta )

cos(alpha )sin(beta )+sin(alpha )cos(beta )& cos(alpha)cos(beta )-sin(alpha )sin(beta )

end{matrix}

right)

end{equation*}

begin{equation*}

=left(

begin{matrix}

cos(alpha +beta )& -sin(alpha +beta )

sin(alpha +beta )& cos(alpha +beta )

end{matrix}

right),

end{equation*}

where again we have used the formulas for $cos(alpha+beta)$ and $sin(alpha+beta)$ from Chapter Pythagoras and Euclid.

We conclude as expected that two successive rotations of angles $alpha$ and $beta$

corresponds to a rotation of angle $alpha +beta$.

end{example}

section{The Transpose of a Matrix}

Given a $2times 2$ matrix $A$ with elements $a_{ij}$, we define

the {em transpose} of $A$

denoted by $A^top$ as the matrix $C=A^top$ with elements $c_{11}=a_{11}$,

$c_{12}=a_{21}$, $c_{21}=a_{12}$, $c_{22}=a_{22}$.

In other words, the rows of $A$ are the columns

of $A^top$ and vice versa.index{transpose of a matrix} For example

[

mbox{if}quad A=left(begin{matrix}1&23&4end{matrix}right)quadmbox{then}

quad A^top=left(begin{matrix}1&32&4end{matrix}right).

]

Of course $(A^top)^top =A$. Transposing twice brings back the original matrix.

We can directly check the validity of the following rules for computing with the transpose:

begin{gather*}

(A+B)^top =A^top +B^top,quad (lambda A)^top =lambda A^top ,

(AB)^top =B^top A^top.

end{gather*}

section{The Transpose of a $2$-Column Vector}

The transpose of a $2$-column vector is the row vector with the same elements:

begin{equation*}

mbox{if}quad x=left(

begin{matrix}

x_1

x_2

end{matrix}

right),quadmbox{then}quad x^top =left(begin{matrix}x_1&x_2end{matrix}right).

end{equation*}

We may define the product of a $1times 2$ matrix (2-row vector) $x^top$ with a

$2times 1$ matrix (2-column vector) $y$

in the natural way as follows:

begin{equation*}

x^top y=left(

begin{matrix}

x_1 & x_2

end{matrix}

right)left(

begin{matrix}

y_1

y_2

end{matrix}

right)

=x_1y_1+x_2y_2.

end{equation*}

In particular, we may write

begin{equation*}

vert xvert ^2=xcdot x=x^top x ,

end{equation*}

where we interpret $x$ as an ordered pair and as a 2-column vector.

section{The Identity Matrix}

The $2times 2$ matrix

begin{equation*}

left(

begin{matrix}

1& 0

0& 1

end{matrix}

right)

end{equation*}

is called the {em identity matrix}index{identity matrix} and is denoted by $I$. We have $IA=A$ and $AI=A$ for any

$2times 2$ matrix $A$.

section{The Inverse of a Matrix}

Let $A$ be a $2times 2$ matrix with elements $a_{ij}$

with $a_{11}a_{22}-a_{12}a_{21}neq 0$. We define the

{em inverse} matrix $A^{-1}$ by

begin{equation}label{inverse2by2A}

A^{-1}=frac{1}{a_{11}a_{22}-a_{12}a_{21}}

left(

begin{matrix}

a_{22}& -a_{12}

-a_{21}& a_{11}

end{matrix}

right) .

end{equation}

We check by direct computation that $A^{-1}A=I$ and that $AA^{-1}=I$, which

is the property we ask an “inverse” to satisfy. We get the

first column of $A^{-1}$ by using the solution formula

eref{sol2syst1} with $b=(1,0)$ and the second column choosing $b=(0,1)$.

The solution to the system of equations $Ax=b$ can be written as $x=A^{-1}b$,

which we obtain by multiplying $Ax=b$ from the left by $A^{-1}$.

We can directly check the validity of the following rules for computing

with the inverse:

begin{gather*}

(lambda A)^{-1} =lambda A^{-1}

(AB)^{-1} =B^{-1} A^{-1}.

end{gather*}

section{Rotation in Matrix Form Again!}

We have seen that a rotation of a vector $x$ by an angle $theta$ into a vector $y$

can be expressed as $y = R_theta x$

with $R_theta$ being the rotation matrix:

begin{equation}

R_theta =left(

begin{matrix}

cos(theta )& -sin(theta )

sin(theta )& cos(theta )

end{matrix}

right)

end{equation}

We have also seen that two successive rotations by angles $alpha$ and $beta$

can be written as

begin{equation}

y = R_beta R_alpha x ,

end{equation}

and we have also shown that $R_beta R_alpha =

R_{alpha+beta}$. This states the obvious fact that two successive rotations

$alpha$ and $beta$ can be performed as one rotation with angle

$alpha +beta$.

We now compute the inverse $R^{-1}_theta $ of a rotation $R_theta $

using eref{inverse2by2A},

begin{equation}

R^{-1}_theta = frac{1}{cos(theta)^2 + sin(theta) ^2}

left(

begin{matrix}

cos(theta) & sin(theta)

-sin(theta) & cos(theta)

end{matrix}

right) = left(

begin{matrix}

cos(-theta) & -sin(-theta)

sin(-theta) & cos(-theta)

end{matrix}

right)

end{equation}

where we use $cos(alpha) = cos(-alpha)$,

$sin(alpha) = -sin(-alpha)$. We see that $R^{-1}_theta = R_{-theta}$,

which is one way of expressing the (obvious) fact that the inverse of a rotation by $theta$ is a

rotation by $-theta$.

We observe that $R^{-1}_theta = R^top _theta $

with $R^top_theta $ the transpose of $R_theta $, so that in particular

begin{equation}label{RRTI}

R_theta R^top_theta =I.

end{equation}

We use this fact to

prove that the length of a vector is not changed by rotation. If $y=R_theta x$, then

begin{equation}

|y|^2 = y^Ty = (R_theta x)^top (R_theta x) = x^top R^top_theta R_theta x = x^top x =

|x|^2.

end{equation}

More generally, the scalar product is preserved after the rotation. If

$y=R_theta x$ and $hat y=R_theta hat x$, then

begin{equation}

ycdothat y = (R_theta x)^top (R_theta hat x) = x^top R_theta^top R_theta hat x = x cdot hat x.

end{equation}

The relation eref{RRTI} says that the matrix $R_theta$ is {em orthogonal}.

Orthogonal matrices play an important role, and we will return to this topic below.

section{A Mirror in Matrix Form}

Consider the linear transformation $2P-I$, where $Px=frac{acdot x}{vert avert^2}a$

is the projection onto the non-zero vector $ainbbR^2$, that is onto the line

$x=sa$ through the origin. In matrix form, this can be expressed

as

begin{equation*}

2P -I= frac{2}{|a|^2} left(

begin{matrix}

a_1^2-1 & a_1a_2

a_2a_1 & a_2^2-1

end{matrix}

right).

end{equation*}

After some reflection(!), looking at fref{mirror2d},

we understand that the transformation $I+2(P-I)=2P-I$ maps

a point $x$ into its mirror image in the line through the origin with direction

$a$.

begin{figure}[htbp]

begin{center}

epsfig{file=LA_R2mirror.eps,height=5cm}

caption{The mapping $2P-I$ maps points to its mirror point relative to the given line.}

label{mirror2d}

end{center}

end{figure}

To see if $2P-I$ preserves scalar products, we

assume that $y=(2P-I)x$ and $hat y=(2P-I)hat x$ and compute:

begin{eqnarray}

ycdot hat y = ((2P-I)x)^top (2P-I)hat x = x^top (2P^top -I)(2P-I)hat x =

x^top (4P^top P – 2P^top I – 2P I + I) hat x = x^top (4 P – 4 P + I)hat x = xcdot hat x,

end{eqnarray}

where we used the fact that $P = P^top $ and $PP = P$, and we thus find an affirmative answer.

section{Change of Basis Again!}

Let ${a_1,a_2}$ and ${hat a_1,hat a_2}$ be two different bases in

$bbR^2$. We then express any given $binbbR^2$ as

begin{equation}label{barxbarab}

b=x_1a_1+x_2a_2=hat x_1hat a_1+hat x_2hat a_2,

end{equation}

with certain coordinates $(x_1,x_2)$ with respect to ${a_1,a_2}$

and some other coordinates $(hat x_1, hat x_2)$ with respect

${hat a_1,hat a_2}$.

To connect $(x_1,x_2)$ to $(hat x_1, hat x_2)$, we

express the basis vectors ${hat a_1,hat a_2}$ in terms of

the basis ${a_1,a_2}$:

begin{gather*}

c_{11}a_1+c_{21}a_2=hat a_1,

c_{12}a_1+c_{22}a_2=hat a_2,

end{gather*}

with certain coefficients $c_{ij}$. Inserting this into eref{barxbarab}, we get

[

hat x_1(c_{11}a_1+c_{21}a_2)+hat x_2(c_{12}a_1+c_{22}a_2)=b.

]

Reordering terms,

[

(c_{11}hat x_1+c_{12}hat x_2)a_1+(c_{21}hat x_1+c_{22}hat x_2)a_2=b.

]

We conclude by uniqueness that

begin{gather}label{xcxbarbasis}

x_1=c_{11}hat x_1+c_{12}hat x_2,

x_2=c_{21}hat x_1+c_{22}hat x_2,

end{gather}

which gives the connection between the coordinates $(x_1,x_2)$ and $(hat x_1,hat x_2)$.

Using matrix notation, we can write this relation as $x=Chat x$ with

[

C=left(

begin{matrix}

c_{11} & c_{12}

c_{21} & c_{22}

end{matrix}

right).

]

begin{figure}[htbp]

begin{center}

mypsfrag{x1}{$x_1$}

mypsfrag{x2}{$x_2$}

mypsfrag{b}{$b$}

mypsfrag{a1}{$a_1$}

mypsfrag{a2}{$a_2$}

mypsfrag{b1}{$b_1$}

mypsfrag{b2}{$b_2$}

mypsfrag{hatb1}{$hat b_1$}

mypsfrag{hatb2}{$hat b_2$}

mypsfrag{hata1}{$hat a_1$}

mypsfrag{hata2}{$hat a_2$}

epsfig{file=LA_R2changeofbasis.eps,height=4.5cm}

caption{A vector $b$ may be expressed in terms of the basis ${a_1,a_2}$ or

the basis ${hat a_1,hat a_2}$.}

label{LA_R2changeofbasis}

end{center}

end{figure}

begin{figure}[htbp]

begin{center}

epsfig{file=DescartesKristina.eps,height=12cm}

caption{Queen Christina to Descartes: “If we conceive the world in that vast extension you give it, it is impossible that man conserve himself therein in this honorable rank, on the contrary, he shall consider himself along with the entire earth he inhabits as in but a small, tiny and in no proportion to the enormous size of the rest. He will very likely judge that these stars have inhabitants, or even that the earths surrounding them are all filled with creatures more intelligent and better than he, certainly, he will lose the opinion that this infinite extent of the world is made for him or can serve him in any way”.}

label{christina}

end{center}

end{figure}

section{Queen Christina}

Queen Christina of Sweden (1626-1689), daughter of Gustaf Vasa King of Sweden 1611-1632, crowned

to Queen at the age 5, officially coronated 1644, abdicated 1652, converted to Catholicism and

moved to Rome 1655.

Throughout her life, Christina had a passion for the arts and for learning,

and surrounded herself with musicians, writers, artists and also

philosophers, theologians, scientists and mathematicians.

Christina had an impressive collection of sculpture and paintings, and was highly respected for both

her artistic and literary tastes. She also wrote several books, including her {em Letters to Descartes}

and {em Maxims}. Her home, the Palace Farnese, was the active center of cultural and intellectual

life in Rome for several decades.

Duc de Guise quoted in Georgina Masson’s Queen Christina biography describes Queen Chistina as follows:

“She isn’t tall, but has a well-filled figure and a large behind,

beautiful arms, white hands.

One shoulder is higher than another, but she hides this defect so well by her bizarre dress,

walk and movements…. The shape of her face is fair but framed by the most extraordinary

coiffure. It’s a man’s wig, very heavy and piled high in front, hanging thick at the sides,

and at the back there is some slight resemblance to a woman’s coiffure….

She is always very heavily powdered over a lot of face cream”.

%Addition of matrices, multiplication of matrix by real number, multiplication of matrices.

problems

begin{problem}

Given the vectors $a$, $b$ and $c$ in $bbR^2$ and the scalars

$lambda, mu in bbR$, prove the following statements

[

begin{split}

a + b &= b + a,quad

(a + b) + c = a + (b + c),quad

a + (-a) = 0

a + 0 &= a,quad

3a = a + a + a,quad

lambda (mu a) = (lambda mu) a,

(lambda + mu) a &= lambda a + mu a,quad

lambda ( a +b) = lambda a + lambda b,quad vert lambda avert =vertlambdavert vert avert .

end{split}

]

Try to give both analytical and geometrical proofs.

end{problem}

begin{problem}

Give a formula for the transformation $f:bbR^2rightarrowbbR^2$

corresponding to reflection through the direction of

a given vector $ainbbR^2$. Find the corresponding matrix.

end{problem}

begin{problem}

Given $a = (3, 2)$ and $b = (1, 4)$, compute

(i) $|a|$, (ii) $|b|$, (iii) $|a + b|$,

(iv)) $|a-b|$, (v) $a/|a|$, (vi) $ b/|b|$.

end{problem}

begin{problem}

Show that the norm of

$a / |a|$ with $a in bbR^2$, $aneq 0$,

is equal to $1$.

end{problem}

begin{problem} Given $ a, b in bbR^2$ prove the following inequalities

a) $|a+b| le |a| + |b|$, b) $a cdot b le |a||b|$.

end{problem}

begin{problem}

Compute $a cdot b$ with

begin{tabular}{ll}

(i) $a = (1,2), b = (3,2)$ & (ii) $a = (10,27), b=(14,-5)$

end{tabular}

end{problem}

begin{problem}

Given $ a, b, c in bbR^2$, determine which of the following

statements make sense:

(i) $a cdot b $, (ii) $a cdot (b cdot c)$, (iii) $(a cdot b) + |c|$,

(iv) $(a cdot b) + c $, (v) $|acdot b|$.

end{problem}

begin{problem}

What is the angle between $a = (1, 1)$ and $b = (3, 7)$?

end{problem}

begin{problem} Given $b = (2, 1)$ construct the set of all vectors

$ainbbR^2$ such that $acdot b = 2$.

Give a geometrical interpretation of this result.

end{problem}

begin{problem} Find the projection of $a$ onto $b$ onto $(1,2)$ with

(i) $a = (1,2) $, (ii) $a = (-2, 1)$, (iii) $a = (2,2) $,

(iv) $a =(sqrt{2}, sqrt{2}) $.

end{problem}

begin{problem}

Decompose the vector $b = (3, 5)$ into one component

parallel to $a$ and one component orthogonal to $a$ for all vectors

$a$ in the previous exercise.

end{problem}

begin{problem}

Let $a$, $b$ and $c = a – b$ in

$bbR^2$ be given, and let the angle between $a$ and $b$ be $phi$.

Show that:

[

|c|^2 = |a|^2 +|b|^2 – 2 |a| |b| cos{phi}.

]

Give an interpretation of the result.

end{problem}

begin{problem}

Prove the law of cosines for a triangle with sidelengths $a$, $b$ and $c$:

[

c^2 = a^2 + b^2 – 2abcos(theta),

]

where $theta$ is the angle between the sides $a$ and $b$.

end{problem}

begin{problem}

Given the 2 by 2 matrix:

[

A = left( begin{array}{cc}

1& 2

3& 4

end{array} right)

]

compute $Ax$ and $A^Tx$ for the following choice of $xinbbR^2$:

begin{tabular}{ll}

(i) $x^T = (1, 2)$ & (ii) $x^T = (1, 1) $

end{tabular}

end{problem}

begin{problem} Given the $2times 2$-matrices:

[

A = left( begin{array}{cc}

1& 2

3& 4

end{array} right),

B = left( begin{array}{cc}

5& 6

7& 8

end{array} right),

]

compute (i) $AB$, (ii) $BA$, (iii) $A^TB$, (iv) $AB^T$, (v) $B^TA^T$, (vi) $(AB)^T$,

(vii) $A^{-1}$, (viii) $B^{-1}$,

(ix) $(AB)^{-1}$, (x) $A^{-1}A$.

end{problem}

begin{problem}

Show that $(AB)^T=B^T A^T$ and that $(Ax)^T=x^TA^T$.

end{problem}

begin{problem} What can be said about $A$ if: a) $A = A^T$ b) $AB = I$?

end{problem}

begin{problem}

Show that the projection:

[

P_a(b) = frac{bcdot a}{|a|^2} a

]

can be written in the form $Pb$,

where $P$ is a $2times 2$ matrix.

Show that $P P = P$ and $P = P^T$.

end{problem}

begin{problem} Compute the mirror image of a point with respect to a straight line

in $bbR^2$ which does not pass through the origin. Express the mapping in matrix form.

end{problem}

begin{problem} Express the linear transformation of

rotating a vector a certain given

angle as a matrix vector product.

end{problem}

begin{problem} Given $ a, b in bbR^2$,

show that the “mirror vector” $bar{b}$

obtained by reflecting $b$ in $a$ can be expressed as:

[

bar{b} = 2Pb – b

]

where $P$ is a certain projection

Show that the scalar product between two vectors is invariant

under a reflection, that is

[

ccdot d = bar{c} cdot bar{d}.

]

end{problem}

begin{problem} Compute $a times b$ and $b times a$ with

(i) $a = (1,2), b = (3,2)$, (ii) $a = (1,2), b=(3,6)$,

(iii) $a = (2,-1), b=(2, 4)$.

end{problem}

begin{problem}

Extend the Matlab functions for vectors in $bbR^2$ by

writing functions for vector product (x = vecProd(a, b)) and rotation

(b = vecRotate(a, angle)) of vectors.

end{problem}

begin{problem} Check the answers to the above problems using Matlab.

end{problem}

begin{problem} Verify that the projection $Px=P_a(x)$ is linear in $x$. Is it linear also in $a$?

Illustrate, as in fref{projislinear}, that $P_a(x+y)=P_a(x)+P_a(y)$.

end{problem}

begin{problem}label{projpointplane0projba} Prove that the formula

eref{projpointplane0} for the projection of a point

onto a line through the origin, coincides with the formula eref{projbontoaR2} for the projection

of the vector $b$ on the direction of the line.

end{problem}

begin{problem} Show that if $hat a=lambda a$, where $a$ is a nonzero vector $bbR^2$ and $lambdaneq 0$,

then for any $binbbR^2$ we have $P_{hat a}(b)=P_a(b)$, where $P_a(b)$ is the projection of $b$

onto $a$. Conclude that the projection onto a non-zero vector $ainbbR^2$ only depends on the direction

of $a$ and not the norm of $a$.

end{problem}

## Leave a Reply