ÿþ<html>
<head>
<title>Albert van der Sel : Vector calculus Part 2.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#D8D8D8" link="blue" alink="blue" vlink="blue">
<font color="black">
<h1>Basic arithmetic/calculus.<br>
In the series: Note 16.<br>
<h1>Subject: Vector calculus / Linear Algebra Part 2 (matrices, operators).</h1>
Date : 18 September, 2016<br>
Version: 0.6<br>
By: Albert van der Sel<br>
Doc. Number: Note 16.<br>
For who: for beginners.<br>
Remark: Please refresh the page to see any updates.<br>
Status: Ready.<br>
<hr/>
<font color="black">
<font face="arial" size=2 color="black">
<br>
<h3>This note is especially for beginners.<br>
<br>
Maybe you need to pick up "some" basic "mathematics" rather <I>quickly</I>.<br>
So really..., my emphasis is on "rather <I>quickly</I>".<br>
<br>
So, I am not sure of it, but I hope that this note can be of use.<br>
Ofcourse, I hope you like my "style" and try the note anyway.</h3>
<br>
Preceding notes, which are all ready:<br>
<br>
<a href="arithmetic4.htm">Note 1: Basic Arithmetic.</a><br>
<a href="linear_equations3.htm">Note 2: Linear Equations.</a><br>
<a href="polynomials5.htm">Note 3: Quadratic Equations and polynomials.</a><br>
<a href="sinecosine3.htm">Note 4: The sine/cosine functions.</a><br>
<a href="differential3.htm">Note 5: How to differentiate and obtain the derivative function .</a><br>
<a href="functionanalysis2.htm">Note 6: Analyzing functions.</a><br>
<a href="elnx3.htm">Note 7: The e<sup>x</sup> and ln(x) functions.</a><br>
<a href="primitive3.htm">Note 8: Primitive functions and Integrals.</a><br>
<a href="complex3.htm">Note 9: Complex numbers.</a><br>
<a href="diffeq9.htm">Note 10: Differential equations Part 1.</a><br>
<a href="funcvar2.htm">Note 11: Functions with two or more variables.</a><br>
<a href="vectorspaces4.htm">Note 12: Vector Calculus / Linear Algebra Part 1.</a><br>
<a href="fourier3.htm">Note 13: Fourier- and Taylor series.</a><br>
<a href="surfacevolume3.htm">Note 14: Surface and Volume integrals.</a><br>
<a href="statistics9.htm">Note 15: Statistics and Probability calculus.</a><br>
<br>
<br>
<B>This note: Note 16: Vector calculus / Linear Algebra Part 2.<br>
For Vector calculus / Linear Algebra Part 1: please see note 12.</B><br>
<br>
Each note in this series, is build "on top" of the preceding ones.<br>
Please be sure that you are on a "level" at least equivalent to the contents up to, and including, note 15.<br>
<br>
<font face="arial" size=2 color="black">
<br>
<br>
<font color="blue">
<h1>Chapter 1. Introduction "Matrices":</h1>
<font color="black">
<font color="blue">
<h2>1.1. Introduction "Vectorspace":</h2>
<font color="black">
In "somewhat" more formal literature, you will encounter the term "vectorspace".<br>
There exists a rather formal definition for it.<br>
<br>
There is nothing to worry, since that definition is perfectly logical (if you have read note 12).<br>
<br>
We already have seen some examples of vectorspaces, like the vectors in R<sup>3</sup>.<br>
So we already seen them before. However, it is good to see also a formal description.<br>
Now, a vector can be written in a row format (like e.g. (1,0,-2)) or column format.<br>
<br>
The <I>elements</I> of a vector are just numbers (like the "-2" above). But in a formal definition, people say<br>
that those elements are from a (scalar) <I>field</I> "K", which is just a number space, like the set of "real numbers".<br>
<br>
<font color="brown">
Formal description:<br>
<br>
A vectorspace "V" over the field "K" is a set of objects which can be added, and multiplied by elements of K<br>
in such way that the sum of elements of V, is again an element of V (a vector), and the product of an element<br>
of V by an element of K is again an element of V, and the following properties are satisfied:<br>
<br>
Given that u, v, w are elements of V (vectors), and λ and μ are elements of K (scalars):<br>
<h3>
1. (u+v)+w = u+(v+w)<br>
2. 0+u = u+0 = u (where "0" is the nulvector, like for example (0,0) or (0,0,0) etc...<br>
3. u+(-u) =0<br>
4. u+v = v+u<br>
5. λ (u+v) = λ u + λ v<br>
6. (λ + μ) v = λ v + μ v<br>
7. (λ μ) v = μ (λ v)<br>
8. 1 v = v (where "1" is simply the scalar "1")<br>
</h3>
<font color="black">
These 8 properties of "V" will not really amaze you. For most properties, we have seen examples in note 12.<br>
Let me recapitulate one. Say, number 4.<br>
Suppose we consider the vectorspace R<sup>3</sup>. Suppose we have the vectors A and B, like:<br>
<TABLE border=0>
<TR><br>
<TD>A =<br>
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>1</sub> ┐<br>
│ a<sub>2</sub> │<br>
└ a<sub>3</sub> ┘
</TD>
</TR>
</TABLE>
<TABLE border=0>
<TR><br>
<TD>B =<br>
</TD>
<TD> <font color="brown" face="courier">
┌ b<sub>1</sub> ┐<br>
│ b<sub>2</sub> │<br>
└ b<sub>3</sub> ┘
</TD>
</TR>
</TABLE>
<br>
Then A + B = B + A, which can be made plausible (or proven) by:<br>
<TABLE border=0>
<TR><br>
<TD>A + B =<br>
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>1</sub> ┐<br>
│ a<sub>2</sub> │<br>
└ a<sub>3</sub> ┘
</TD>
<TD>+<br>
</TD>
<TD> <font color="brown" face="courier">
┌ b<sub>1</sub> ┐<br>
│ b<sub>2</sub> │<br>
└ b<sub>3</sub> ┘
</TD>
<TD>=<br>
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>1</sub> + b<sub>1</sub> ┐<br>
│ a<sub>2</sub> + b<sub>2</sub> │<br>
└ a<sub>3</sub> + b<sub>3</sub> ┘
</TD>
</TD>
<TD>=<br>
</TD>
<TD> <font color="brown" face="courier">
┌ b<sub>1</sub> + a<sub>1</sub> ┐<br>
│ b<sub>2</sub> + a<sub>2</sub> │<br>
└ b<sub>3</sub> + a<sub>3</sub> ┘
</TD>
</TD>
<TD>=<br>
</TD>
<TD>B + A<br>
</TD>
</TR>
</TABLE>
<br>
<font color="blue">
<h2>1.2. What is a "Matrix"?:</h2>
<font color="black">
A matrix is an (rectangular) "array" of numbers. It has "m" rows, and "n" columns.<br>
In many applications, we have m=n, so the number of rows is equal to the number of columns. In that case, it's a "square" matrix.<br>
<br>
Here is an example:<br>
<br>
<B>Figure 1. Example MxN matrix ("m" rows, and "n" columns)</B><br>
<br>
<img src="vpart2_1.jpg" align="centre"/>
<br>
<br>
Do not forget that the "elements" like a<sub>12</sub>, in the matrix, are just numbers, like for example 1, -5, 27.344, π etc..<br>
<br>
Ofcourse, a matrix is not "just" an array of numbers. It must have a "real" meaning to it.<br>
I am going to make it plausible for you, that a Matrix can be interpreted as:<br>
<br>
<B>Listing 1:</B><br>
<br>
1. An object that determines and describes all the coefficients of a set of linear equations.<br>
2. A "mapping" (or Operator, or Linear Transformation) on vectors.<br>
3. That it can represents a tensor (in some fields of math or physics).<br>
<br>
That a matrix can be identified as a linear "mapping" (sort of function on vectors), is probably<br>
the most common idea on matrices.<br>
<br>
<font color="brown">
Note:<br>
In professional literature, scientists often use a sort of "shortcut" notation for a matrix.<br>
Instead of the large rectangular array, they might simply write the matrix as:<br>
<h2> a<sub>ij</sub></h2>
where it is "implicitly" assumed (or clear) that we know that i "runs" from "1 to m", and j "runs" from "1 to n".<br>
I will not use it much, but as you might see, it's a great way not to have the trouble of writing down such a "large object"<br>
as a N x M matrix, like in figure 1. Saves a lot of time and effort.<br>
<font color="black">
<br>
Besides that we are going to understand how to interpret matrices, we ofcourse will do some great excercises too.<br>
<br>
<font color="blue">
<h2>1.3 The matrix as a "coefficient matrix" of a set lineair equations</h2>
<font color="black">
<font color="blue">
<h3>Example: coordinate transformation.</h3>
<font color="black">
I'am going to use a "famous" problem here: <B>a coordinate transformation</B>. The discussion will show that a matrix is indeed<br>
a "mapping", as well as that you can interpret it as an object that determines all the coefficients of a set of linear equations.<br>
<br>
Suppose we have a vectorspace "V" of dimension "n". Then we need "n" independend basisvectors (or unit vectors),<br>
in order to be able to describe any other vector.<br>
It's quite the same as we already saw in note 12 (if needed, revisit note 12 again).<br>
<br>
But actually we can have multiple (unlimited) of such sets of basisvectors. Suppose that we look at the familiar R<sup>3</sup> space.<br>
Then it's quite common to take (1,0,0), (0,1,0), and (0,0,1) as such basisvectors.<br>
But this is not the only possible set. Just imaging that you "rotate" all axes (x-, y, and z-axis) over π/2 degrees<br>
in some direction.
Then, you can see that there is another set of unit vectors, tilted by π/2, compared to our first one.<br>
<br>
So, suppose we have the following two sets of unit vectors of V:<br>
<br>
<B>Listing 2:</B><br>
<h2>Β = {v<sub>1</sub>, v<sub>2</sub>, .. ,v<sub>n</sub>}<br>
<br>
Β' = {w<sub>1</sub>, w<sub>2</sub>, .. ,w<sub>n</sub>}</h2>
Then <B>each</B> w<sub>i</sub> can be viewed as an <B>ordinary vector</B> in the set Β, and thus can be expressed<br>
as a linear combination of the v<sub>1</sub>, v<sub>2</sub>, .. ,v<sub>n</sub> basis vectors.<br>
In fact, we thus obtain a "set of linear equations".<br>
<br>
<B>Listing 3:</B><br>
<h2>w<sub>1</sub> = a<sub>11</sub>v<sub>1</sub> + a<sub>12</sub>v<sub>2</sub> + .. + a<sub>1n</sub>v<sub>n</sub><br>
..<br>
..<br>
w<sub>n</sub> = a<sub>n1</sub>v<sub>1</sub> + a<sub>n2</sub>v<sub>2</sub> + .. + a<sub>nn</sub>v<sub>n</sub></h2>
All those coefficients a<sub>ij</sub> form a square nxn matrix.<br>
<br>
<B>Figure 2. the NxN matrix that belongs to listing 3.</B><br>
<br>
<img src="vpart2_2.jpg" align="centre"/>
<br>
<br>
So, the coordinate <B>transformation</B> (which is a mapping too) of our example above, leads to a set of linear equation,<br>
and we can have all coefficients of that set, correspond to a Matrix.<br>
<br>
<br>
<font color="blue">
<h2>1.4 The matrix as a "Mapping" or Linear Transformation</h2>
<font color="black">
This chapter is ony an introduction. I want to establish a certain "look and feel" at an early moment.<br>
A more thourough discussion follows at a later moment.<br>
<br>
We can multiply an n x n matrix with an 1xn Column Vector.<br>
It will turn out, that in many cases we can identify that multiplication with a "mapping", meaning<br>
that a vector will be mapped to another vector.<br>
<br>
I must say that the statement <I>"We can multiply an n x n matrix with an 1xn Column Vector"</I> is not<br>
a universal enough. As we will see, we can multiply a "MxN" matrix with a "NxS" matrix, leading to a "MxS" matrix.<br>
Note how general such statement is. The results could thus also return a column or row vector,<br>
which in many cases can be identified as a mapping too.<br>
<br>
We must make that "plausible" ofcourse, meaning that the statements really make sense.<br>
<br>
However, <I>for the moment</I>, please take notice of the following two statements:<br>
<font color="brown">
<h3>Statement 1: general multiplication</h3>
<font color="black"
<h3> M x N . N x S => leads to a M x S matrix</h3>
It's quite easy to remember, since the result matrix uses the "outer" indices (m and s) only.<br>
It will be proven at a later moment.<br>
<br>
<font color="brown">
<h3>Statement 2: two special cases.</h3>
<font color="black">
<h3>2.1 A 3x3 matrix and a column vector (1x3):</h3>
<br>
Let's explain how it's done. Each element of each row of the matrix, starting with the first row, is multiplied<br>
with the elements of the column vector. This should be quite easy to remeber too.<br>
Note that the operation leads to another column vector.<br>
We can identify such matrix as a Linear Transformation on objects in R<sup>3</sup>, so in general we speak of a R<sup>3</sup> -> R<sup>3</sup> mapping.<br>
<br>
<h3>2.2 A 2x2 matrix and a column vector (1x2):</h3>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ a b ┐<br>
└ c d ┘
</TD>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
└ y ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ ax+by ┐<br>
└ cx+dy ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ x' ┐<br>
└ y' ┘
</TD>
</TR>
</TABLE>
<br>
It's quite the same as 2.1, however here we can see a R<sup>2</sup> -> R<sup>2</sup> mapping.<br>
Note that here too, the result of the mapping is a vector again.<br>
<br>
<B>Examples:</B><br>
<br>
Let's try a few examples of the procedure of 2.2:<br>
<br>
<B>Example 1:</B><br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ 3 0 ┐<br>
└ 0 3 ┘
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
└ 2 ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ 3*1+0*2 ┐<br>
└ 0*2+3*2 ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ 3 ┐<br>
└ 6 ┘
</TD>
</TR>
</TABLE>
<br>
So, in this example, the vector (1.2) is mapped to (3,6).<br>
Actually, this will happen with any vector in R<sup>2</sup>. So, this mapping is a sort of "scaling" operator,<br>
"enlarging" any vector by "3".<br>
<br>
<B>Example 2:</B><br>
<br>
You do not need to "verify" or something, the following mapping.<br>
Let's again stay in R<sup>2</sup>. If we have any vector (x,y), then a clockwise rotation<br>
of the vector over an angle ϕ, can be expressed by:<br>
<TABLE border=0>
<TR><br>
<TD> <font color="brown" face="courier">
┌ cos(ϕ). sin(ϕ) ┐<br>
└ -sin(ϕ) cos(ϕ) ┘
</TD>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
└ y ┘
</TD>
</TR>
</TABLE>
<br>
So, if indeed would have a particular vector, say (1,2) or any other, and you know the angle ϕ,<br>
then you can calculate sin(ϕ) and cos(ϕ). Then using the general procedure as shown in 2.2,<br>
allows you to calculate the result vector.<br>
<br>
Remember, the main purpose of this chapter, is to give you a pretty good idea on the several interpretations<br>
of matrices (as was shown in listing 1 above). And at this point, real "calculations" are not important.<br>
<br>
<font color="blue">
<h2>1.5 Matrices and Tensors.</h2>
<font color="black">
Maybe it's not appropriate to say something on <I>tensors</I> at this stage, but I like to try<br>
to provide a good overview on matters.<br>
<br>
As it is now, we have scalars, vectors, and matrices.<br>
<br>
-scalar: just a number, like the temperature at points in space.<br>
There is no "direction" associated with scalars.<br>
<br>
-vector: an object with magnitude (length) and direction.<br>
Many physical phenomena can be expressed by vectors, like an Electric field,<br>
which has a certain magnitude at points, but a "direction" as well (e.g. a positively charge partice moves along the field).<br>
<br>
-Matrix: It's probably best to associate it with an "operator", or "linear mapping".<br>
<br>
Well, it's math so take stuff seriously. However, not too "strickt"....<br>
<br>
You can easily say that some scalar, is an operator as well. Just look at this:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
5 *
</TD>
<TD> <font color="brown" face="courier">
┌ 3 ┐<br>
└ 2 ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ 15 ┐<br>
└ 10 ┘
</TR>
</TABLE>
<br>
Here the scalar "5" looks like a (linear) operator... and here it really is.<br>
<br>
Now, about tensors. Tensors have a <B>"rank"</B>. A tensor of rank 2, can be identified as a matrix.<br>
<br>
You know that a matrix is characterized by it's elements. We generally have a <B>mxn</B> Matrix,<br>
with m rows and n columns. We need two indices, to run over all m and n.<br>
<br>
So, with a<sub>ij</sub>=a<sub>23</sub> we indentify the element in the second row, the third column.<br>
<br>
But tensors exist with even a higher rank, for example rank 3.<br>
<br>
Some structures in physics, can only adequately be described by a rank 3 tensor.<br>
For example, SpaceTime. Einstein described gravity, as the result of curved SpaceTime.<br>
He extensively used higher rank tensors in the theories.<br>
<br>
But we can stay closer to home as well. Suppose you have some material, like a block of metal.<br>
I you apply a torque at both ends, then the inner "twist" of directions that the material feels,<br>
is so complex that you need a sort of a<sub>ijk</sub> mathematical object, to describe it mathematically.<br>
<br>
But wait, we can only have mxn matrices, described by elements a<sub>ij</sub>. So clearly, an a<sub>ijk</sub> tensor<br>
is really beyond a normal mxn matrix.<br>
<br>
For tensors (in physics), ijk indices can be used, but more often, physicists like indices as μ, ν η.<br>
So, in professional literature, you may see a third rank tensor as T<sub>η</sub><sup>μ ν</sup> or T<sup>μ ν η</sup>.<br>
<br>
A third rank tensor may be visualized as a "stack" of a<sub>ij</sub> matrices, or better, as a cube.<br>
For higher rank tensors, we cannot visualize it anymore. We can only do math with them.<br>
<br>
The figure below, might give an impresson on a (second rank) matrix, and a third rank tensor.<br>
<br>
Keep in mind, the nxm does not determine the rank of a true matrix: it's rank is always 2 (or 1 in case<br>
of a 1xn or nx1 matrix, where you only need one index).<br>
<br>
So, even if you have a 8x10 matrix, you still have only 2 indices, "i" and "j". Indeed, you still only have to deal<br>
with rows and columns. A matrix will always resemble a part of a spreadsheet if you like.<br>
<br>
Only a rank 3 tensor, or higer rank tensor, needs more than 2 indices to describe the elements.<br>
A rank 3 tensor, looks like a "cube", or stack of matrices, where thus one extra index is required.<br>
<br>
<I>The above text, is kept rather general, and indeed, there are some special exceptions.</I><br>
<br>
<B>Figure 3. Comparing a second rank tensor (or matrix), with a third rank tensor.</B><br>
<br>
<img src="vpart2_4.jpg" align="centre"/>
<br>
<br>
The next chapter deals with further properties of matrices, and matrix calculations.<br>
<br>
<br>
<font color="blue">
<h1>Chapter 2. Properties of matrices, and calculating with matrices:</h1>
<font color="black">
If we see a matrix operating on a vector, no matter what the dimension the Vectorspace is,<br>
like for example:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ a b ┐<br>
└ c d ┘
</TD>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
└ y ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ x' ┐<br>
└ y' ┘
</TD>
</TR>
</TABLE>
<br>
Then we will often use the following condensed notation:<br>
<h3>AX = X'</h3>
Where A is the matrix, X is the original vector, and X' is the (mapped) resultvector.<br>
<br>
Next, we will see a listing of short subjects, all of which are important in "vector calculus" or "linear algebra".<br>
<br>
<font color="blue">
<h3>1. Multiplication of a matrix with a scalar:</h3>
<font color="black">
Suppose A is a matrix, and λ is a scalar (a scalar is just a number).<br>
<br>
Then: multiplying the matrix with λ, means multiplying each element a<sub>ij</sub> with λ.<br>
So, for example for a 2x2 matrix:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ a b ┐<br>
└ c d ┘
</TD>
</TR>
</TABLE>
<br>
then λ A would yield:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
λ A =
</TD>
<TD> <font color="brown" face="courier">
┌ λa λb ┐<br>
└ λc λd ┘
</TD>
</TR>
</TABLE>
<font color="blue">
<h3>2. Addition of matrices:</h3>
<font color="black">
This is only defined and meningful, if both are of the same "size", thus both are "mxn" matrices, with the same "m" and "n".<br>
So both have the same number of columns and rows, like for example "3x3" or "2x4" or "2x5" etc...<br>
<br>
Suppose:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>11</sub> a<sub>12</sub> a<sub>13</sub> a<sub>14</sub> ┐<br>
└ a<sub>21</sub> a<sub>22</sub> a<sub>23</sub> a<sub>24</sub> ┘
</TD>
</TR>
</TABLE>
<TABLE border=0>
<TD> <font color="brown" face="courier">
B =
</TD>
<TD> <font color="brown" face="courier">
┌ b<sub>11</sub> b<sub>12</sub> b<sub>13</sub> b<sub>14</sub> ┐<br>
└ b<sub>21</sub> b<sub>22</sub> b<sub>23</sub> b<sub>24</sub> ┘
</TD>
</TR>
</TABLE>
Then:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A + B = B + A=
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>11</sub>+b<sub>11</sub> a<sub>12</sub>+b<sub>12</sub> a<sub>13</sub>+b<sub>13</sub> a<sub>14</sub>+b<sub>14</sub> ┐<br>
└ a<sub>21</sub>+b<sub>21</sub> a<sub>22</sub>+b<sub>22</sub> a<sub>23</sub>+b<sub>23</sub> a<sub>24</sub>+b<sub>24</sub> ┘
</TD>
</TR>
</TABLE>
<font color="blue">
<h3>3. The Identity Matrix:</h3>
<font color="black">
This special <B>"square" nxn matrix</B>, will have all a<sub>ij</sub>=0, except voor those a<sub>ij</sub> where i=j. If i=j, then a<sub>ij</sub>=1 <br>
In effect, only the diagonal elements, from the upper left to the lower right, will be "1".<br>
We will see that this matrix, maps a column vector onto itself. In effect, the matrix does "nothing".<br>
Hence the name "Identity matrix", often denoted by "I".<br>
<br>
Here the 3x3 "Identity matrix":<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
I =
</TD>
<TD> <font color="brown" face="courier">
┌ 1 0 0 ┐<br>
│ 0 1 0 │<br>
└ 0 0 1 ┘
</TD>
</TR>
</TABLE>
<br>
The 2x2 "Identity matrix" is this one:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
I =
</TD>
<TD> <font color="brown" face="courier">
┌ 1 0 ┐<br>
└ 0 1 ┘
</TD>
</TR>
</TABLE>
<br>
Let's perform an operation with 3x3 "I", on the column vector "X"<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
IX =
</TD>
<TD> <font color="brown" face="courier">
┌ 1 0 0 ┐<br>
│ 0 1 0 │<br>
└ 0 0 1 ┘
</TD>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
│ y │<br>
└ z ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ 1x+0y+0z ┐<br>
│ 0x+1y+0z │<br>
└ 0x+0y+1z ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
│ y │<br>
└ z ┘
</TD>
</TR>
</TABLE>
<br>
So, "I" maps the vector onto itself, and the result vector is the same as the original vector.<br>
You may wonder why it is neccessary to mention "I" at all. Well, It can help to understand the "inverse" matrix A<sup>-1</sup> of matrix A.<br>
<br>
<font color="brown">
Note:<br>
In some articles you may also see the "Kronecker delta" notation for the Identity matrix, using the δ<sub>ij</sub> symbol.<br>
Using this notation, it is understood (or actually agreed upon), that:<br>
<br>
δ<sub>ij</sub> = 0 for i <> j, and<br>
δ<sub>ij</sub> = 1 for i = j.<br>
<font color="black">
<br>
<font color="blue">
<h3>4. The Inverse Matrix:</h3>
<font color="black">
If the matrix "A" can be identified as a "mapping" (or transformation), then generally we may write:<br>
<h3>AX = X'</h3>
In many cases, the mapping <B>A</B> has an "inverse" mapping <B>A<sup>inv</sup></B>, or also notated as A<sup>-1</sup>,<br>
which is the precise opposite mapping of A.<br>
<br>
Suppose that A is a clockwise rotation of vectors in R<sup>2</sup> over some angle ϕ.<br>
Then A<sup>inv</sup> is the counter-clockwise rotation over that same angle ϕ.<br>
When you apply A, and next A<sup>inv</sup>, a vector is again mapped onto itself.<br>
<br>
For a mapping A and it's inverse mapping A<sup>inv</sup>, it holds that:<br>
<h3> AA<sup>inv</sup>X = X</h3>
or:<br>
<h3> AA<sup>inv</sup> = I</h3>
So if you apply A (on some source vector), and then apply A<sup>inv</sup>, then the result is that you have the original again.<br>
<br>
<font color="blue">
<h3>5. Viewing the rows and columns of a Matrix, as vectors:</h3>
<font color="black">
We have seen quite a few nxm and square nxn matrices by now.<br>
<br>
Sometimes, it can be handy to view the "n" columns of the matrix, as "n" columnvectors.<br>
And, likewise, to view the "m" rows of the matrix, as "m" rowvectors.<br>
<br>
There are some good reasons for viewing a matrix that way, in some occasions. For example, suppose that you see<br>
that for a certain matrix, the columnvectors are not <B>independent</B> (like the second column is just equal to a scalar times the first column),<br>
then the are implications for the "mapping" that this matrix represents.<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>11</sub> a<sub>12</sub> a<sub>13</sub> ┐<br>
│ a<sub>21</sub> a<sub>22</sub> a<sub>23</sub> │<br>
└ a<sub>31</sub> a<sub>32</sub> a<sub>33</sub> ┘
</TD>
</TR>
</TABLE>
<br>
Then sometimes it's handy to take a closer look at the column vectors of A.<br>
<br>
For example, are the following vectors:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ a<sub>11</sub> ┐<br>
│ a<sub>21</sub> │<br>
└ a<sub>31</sub> ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>12</sub> ┐<br>
│ a<sub>22</sub> │<br>
└ a<sub>32</sub> ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
┌ a<sub>13</sub> ┐<br>
│ a<sub>23</sub> │<br>
└ a<sub>33</sub> ┘
</TD>
</TR>
</TABLE>
<br>
independent? That is, is one vector not just a "multiplication" of a number with another vector?<br>
<br>
In chapter 3, we will appreciate this better.<br>
For now, the only thing that I like to say here, is that we can also view a matrix as a set<br>
columnvectors, or rowvectors, which may give us some extra insights on several occasions.<br>
<br>
<font color="blue">
<h3>6. The Transpose of a Matrix:</h3>
<font color="black">
If you have any mxn matrix A, then if you simply <I>interchange</I> all the rows and columns,<br>
you get the transpose matrix <sup>t</sup>A.<br>
<br>
Example:<br>
<br>
Suppose that matrix A is:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ 2 1 0 ┐<br>
└ 1 3 5 ┘
</TD>
</TR>
</TABLE>
Then the transpose Matrix "<sup>t</sup>A" is:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
<sup>t</sup>A =
</TD>
<TD> <font color="brown" face="courier">
┌ 2 1 ┐<br>
│ 1 3 │<br>
└ 0 5 ┘
</TD>
</TR>
</TABLE>
<br>
There are several reasons why the transpose matrix is defined. One of which we will see later on.<br>
<br>
One reason we will see here now: if a nxn matrix is "symmetric" with respect to it's diagonal, then A = <sup>t</sup>A,<br>
thus in that case, the matrix A is fully equal to it's transpose matrix.<br>
<br>
Example of a symmetric matrix (neccessarily nxn ofcourse):<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ 2 1 5┐<br>
│ 1 3 0│<br>
└ 5 0 2┘
</TD>
</TR>
</TABLE>
<br>
For that matrix, it is true that A = <sup>t</sup>A. You can easily check it by interchanging the rows and columns.<br>
<br>
<font color="blue">
<h3>7. The Determinant of a Matrix:</h3>
<font color="black">
For a square nxn matrix, you can calculate it's <B>determinant</B>. It's just a scalar, specific for that matrix,<br>
using a certain calculation of the elements a<sub>ij</sub> of that matrix.<br>
<br>
This number, belonging to the matrix <B>A</B>, is denoted by either <B>det(A)</B>, and often also by <B>|A|</B>.<br>
<br>
For a 2x2 matrix, the determinant is calculated as in the example below:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ a b ┐<br>
└ c d ┘
</TD>
</TR>
</TABLE>
<br>
Then:<br>
<h3>det(A) = ad - bc</h3>
What use can we possibly have from calculating the determinant?<br>
<br>
There are several properties of the matrix you can immediately deduce, once you have the determinant.<br>
One important one is this: can we view the columnvectors of the matrix as being <B>independent</B>?<br>
<br>
Consider this matrix:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ 3 0 ┐<br>
└ 0 3 ┘
</TD>
</TR>
</TABLE>
<br>
Then |A| = 3*3 - 0*0 = 9.<br>
<br>
Now, consider this matrix:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
B =
</TD>
<TD> <font color="brown" face="courier">
┌ 1 2 ┐<br>
└ 2 4 ┘
</TD>
</TR>
</TABLE>
<br>
Then |B| = 1*4 - 2*2 = 0.<br>
<br>
In the latter case, |B|=0. If you look more closely to the columnvectors of matrix B,<br>
then those two vectors are not independent.<br>
Here we can see that:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ 2 ┐<br>
└ 4 ┘
</TD>
<TD>
=
</TD>
<TD>
2*
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
└ 2 ┘
</TD>
</TR>
</TABLE>
<br>
So, those two columnvectors are not independent.<br>
If the det(A)=0 for some matrix A, then we know that the columnvectors are not all independent,<br>
which can be important in certain occasions (see chapter 3).<br>
<br>
<br>
<font color="blue">
<h1>Chapter 3. More on Linear mappings or Linear transformations:</h1>
<font color="black">
It's true that many subjects in physics, can be described by what is called "a linear mapping".<br>
<br>
We already have seen some examples, like the rotation of vectors in R<sup>2</sup> over an angle, which can<br>
can be described by a matrix.<br>
<br>
However, there also exist several classes of "non-linear mappings", which often are a subject in<br>
more advanced notes.<br>
<br>
The definition of a Linear mapping or Linear transformation is certainly not difficult.<br>
We will see it in a moment.<br>
<br>
In a somewhat more formal description in linear algebra, folks speak of vectorspaces "V" and "W",<br>
where both can have <I>any number of dimensions.</I><br>
<br>
We often, "silently", assumed that we were dealing with a mapping from e.g. R<sup>2</sup> -> R<sup>2</sup>, or R<sup>3</sup> -> R<sup>3</sup> etc..<br>
However, exploring mappings from e.g. R<sup>4</sup> -> R<sup>2</sup>, are very common subjects in linear algebra.<br>
<br>
So, when a formal description talks of vectorspaces "V" and "W", you ofcourse may think of examples like R<sup>3</sup> -> R<sup>3</sup>,<br>
or simply go with the general formulation using the V and W vectorspaces.<br>
<br>
<font color="blue">
<h2>3.1 What is a Linear Transformation?</h2>
<font color="black">
Let V and W be vectorspaces over the field K.<br>
Let the vectors <B>u</B> and <B>v</B> be members of V (that is: <B>u</B> and <B>v</B> ∈ V).<br>
Let λ be an element of K.<br>
<br>
A <B>linear mapping</B> F: V -> W is a mapping with the properties:<br>
<h3> F(u + v) = F(u) + F(v)</h3>
<h3> F(λv) = λ F(v)</h3>
Note that V -> W might thus also be V -> V (like R<sup>3</sup> -> R<sup>3</sup>).<br>
<br>
These are pretty simple rules. In a interpretation from physics, one might say that the mapping has no bias<br>
for a certain direction in the vectorspaces.<br>
You might also say that you see some "associative" and "distributive" properties here.<br>
<br>
As an example of property 1:<br>
<br>
Suppose we have a rotation operator A.<br>
<br>
<B>Method 1:</B><br>
Let's first add two vectors <B>u</B> and <B>v</B> in the usual way. This will yield result vector <B>w</B> = <B>u</B> + <B>v</B>.<br>
Next, we let the rotation operator work on <B>w</B>. This will yield <B>w'</B>.<br>
<br>
Will this be the same as the following sequence of events?<br>
<br>
<B>Method 2:</B><br>
Let the rotation operator first work on <B>u</B> and <B>v</B>. This will yield the result vectors <B>u'</B> and <B>v'</B>.<br>
Then we will add <B>u'</B> and <B>v'</B>, resulting in <B>w'</B> = <B>u'</B> + <B>v'</B>.<br>
<br>
Does both methods result in the same <B>w'</B> ? If so, then A is a linear mapping.<br>
<br>
<h3>Let's try it, using a simple example.</h3>
Let the mapping A have the associate matrix:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
A =
</TD>
<TD> <font color="brown" face="courier">
┌ 0 -1 ┐<br>
└ 1. 0 ┘
</TD>
</TR>
</TABLE>
This is a counter clockwise rotation over 90 degrees. Yes, I indeed choose a simple one, but that does not matter at all.<br>
<br>
Let the vectors <B>u</B> and <B>v</B> be:
<TABLE border=0>
<TD> <font color="brown" face="courier">
u =
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
└ 0 ┘
</TD>
</TR>
</TABLE>
<TABLE border=0>
<TD> <font color="brown" face="courier">
v =
</TD>
<TD> <font color="brown" face="courier">
┌ 0 ┐<br>
└ 1 ┘
</TD>
</TR>
</TABLE>
Yes, these are the standard basis vectors of R<sup>2</sup>, but that's OK too.<br>
<br>
<B>=> Let's do method 1 first.</B><br>
<br>
Adding <B>u</B> and <B>v</B> results in the vector <B>w</B> = (1,1).<br>
Next, let A operate on <B>w</B>:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
Aw =
</TD>
<TD> <font color="brown" face="courier">
┌ 0 -1 ┐<br>
└ 1. 0 ┘
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
└ 1 ┘
</TD>
<TD>
=
</TD>
<TD> <font color="brown" face="courier">
┌ -1 ┐<br>
└ 1. ┘
</TD>
</TR>
</TABLE>
<br>
<B>=> Next we do method 2:</B><br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
Au =
</TD>
<TD> <font color="brown" face="courier">
┌ 0 -1 ┐<br>
└ 1. 0 ┘
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
└ 0 ┘
</TD>
<TD>
=
</TD>
<TD> <font color="brown" face="courier">
┌ 0 ┐<br>
└ 1 ┘
</TD>
</TR>
</TABLE>
<TABLE border=0>
<TD> <font color="brown" face="courier">
Av =
</TD>
<TD> <font color="brown" face="courier">
┌ 0 -1 ┐<br>
└ 1. 0 ┘
</TD>
<TD> <font color="brown" face="courier">
┌ 0 ┐<br>
└ 1 ┘
</TD>
<TD>
=
</TD>
<TD> <font color="brown" face="courier">
┌ -1 ┐<br>
└ 0. ┘
</TD>
</TR>
</TABLE>
<br>
So:<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
Au + Av =
</TD>
<TD> <font color="brown" face="courier">
Aw =
</TD>
<TD> <font color="brown" face="courier">
┌ 0 ┐<br>
└ 1 ┘
</TD>
<TD>
+
</TD>
<TD> <font color="brown" face="courier">
┌ -1 ┐<br>
└ 0. ┘
</TD>
<TD>
=
</TD>
<TD> <font color="brown" face="courier">
┌ -1 ┐<br>
└ 1. ┘
</TD>
</TR>
</TABLE>
<br>
Yes, both methods work out the same way. So, in this particular example we have <B>A(u+v) = A(u) + A(v)</B><br>
<br>
<font color="blue">
<h2>3.2 A Linear Transformation and it's Matrix, and the mapping of the basis vectors.</h2>
<font color="black">
<h3>Example of directly finding the matrix of some Linear Transformation:</h3>
Suppose we have a linear mapping <B>F:</B> R<sup>4</sup> -> R<sup>2</sup>.<br>
<br>
Yes, this is from a 4 dimensional vectorspace (V) to our familiar 2 dimensional vectorspace (W).<br>
<br>
Suppose further that the set of vectors {E<sup>1</sup>, E<sup>2</sup>, E<sup>3</sup>, E<sup>4</sup>} form a set of basisvectors in V.<br>
<br>
Next, suppose that we know of the following mappings of <B>F</B>:<br>
<br>
</TABLE>
<TABLE border=0>
<TD> <font color="brown" face="courier">
F(E<sup>1</sup>)=
</TD>
<TD> <font color="brown" face="courier">
┌ 2 ┐<br>
└ 1 ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
F(E<sup>2</sup>)=
</TD>
<TD> <font color="brown" face="courier">
┌ 3. ┐<br>
└ -1 ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
F(E<sup>3</sup>)=
</TD>
<TD> <font color="brown" face="courier">
┌ -5 ┐<br>
└ 4. ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
F(E<sup>4</sup>)=
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
└ 7 ┘
</TD>
</TR>
</TABLE>
<br>
Then I immediately know the matrix that we can associate with F, namely<br>
<br>
</TABLE>
<TABLE border=0>
<TD> <font color="brown" face="courier">
F =
</TD>
<TD> <font color="brown" face="courier">
┌ 2 3. -5 1 ┐<br>
└ 1 -1 4. 7 ┘
</TD>
</TR>
</TABLE>
<br>
I will make it plausible to you, how I came to this knowledge.<br>
<br>
<B><I>I will show you, that if you have a linear mapping "F", that then the mappings of the basisvectors, immediately<br>
will show you the column vectors of the matrix of "F".</I></B><br>
<br>
In fact, this is exactly what happened in the example above.<br>
Let's try this in R<sup>3</sup>. Watch the following reasoning.<br>
<br>
Suppose F is a "linear mapping" from R<sup>3</sup> to R<sup>3</sup>.<br>
So, we suppose that the matrix of F is:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
F =
</TD>
<TD> <font color="brown" face="courier">
┌ a b c ┐<br>
│ d e f │<br>
└ g h i ┘
</TD>
</TR>
</TABLE>
<br>
We further do not know anything of F, except that it is a linear mapping. Hence also the unknow elements in the matrix above.<br>
<br>
In R<sup>3</sup>, we have the following set of orthonormal basisvectors:<br>
<br>
</TABLE>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
│ 0 │<br>
└ 0 ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
┌ 0 ┐<br>
│ 1 │<br>
└ 0 ┘
</TD>
<TD>
,
</TD>
<TD> <font color="brown" face="courier">
┌ 0 ┐<br>
│ 0 │<br>
└ 1 ┘
</TD>
</TR>
</TABLE>
<br>
Next, we let the matrix F operate on our basisvectors. I will do this only for the (1,0,0) basisvector.<br>
For the other two, the same principle applies. So, this will yield:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ a b c ┐<br>
│ d e f │<br>
└ g h i ┘
</TD>
<TD> <font color="brown" face="courier">
┌ 1 ┐<br>
│ 0 │<br>
└ 0 ┘
</TD>
<TD>
=
</TD>
<TD> <font color="brown" face="courier">
┌ a*1+b*0+c*0 ┐<br>
│ d*1+e*0+f*0 │<br>
└ g*1+h*0+i*0 ┘
</TD>
<TD>
=
</TD>
<TD> <font color="brown" face="courier">
┌ a ┐<br>
│ d │<br>
└ g ┘
</TD>
</TR>
</TABLE>
<br>
Well, this is indeed the first column vector of the matrix F.<br>
<br>
So, one fact to remember is: <I>the mappings of the basis vectors correspond to the column vectors of the matrix.</I><br>
<br>
<br>
<font color="blue">
<h1>Chapter 4. Distances in R<sup>n</sup> (flat Eucledian space):</h1>
<font color="black">
<I>In another note, I will show hoe to deal with "distances" in non-Eucledian curved spaces, or using a different non-Cartesian<br>
coordinate system. Then also "contravariant" and "covariant" vectors and indices will be discussed.<br>
I think that this sort of stuff will go into note 18.</I><br>
<br>
In this section, we going to discuss the "distance" between points in R<sup>n</sup> (like R<sup>2</sup> or R<sup>3</sup>).<br>
<br>
You can view this stuff in multiple ways. You can say that we "just" have two points P and P', and the line segment<br>
which connects those two points, clearly determines the distance between them.<br>
You can also say that we have a vector P and vector P', and the length of the vector P-P',<br>
simply is the distance.<br>
For about the last statement: take a look at figure 4, the third picture. Here we have vectors A and B, and <B>the lenght</B><br>
of the vector "A-B", defines the distance between the endpoints of A and B.<br>
<br>
<B>Figure 4. Some example distances.</B><br>
<br>
<img src="vpart2_6.jpg" align="centre"/>
<br>
<br>
<font color="brown">
<h3>In R<sup>2</sup>:</h3>
<font color="black">
In figure 4, in the first picture, we have R<sup>2</sup> space. You can see that we have two points:<br>
<br>
P : (x<sub>1</sub>, y<sub>1</sub>)<br>
P': (x<sub>2</sub>, y<sub>2</sub>) (note the accent on the "P")<br>
<br>
We want to find the length of the segment PP'. Usually, the lenght of such a segment is denoted by |PP'|.<br>
<br>
You can always "find" or construct a "right-angled triangle", when you have two points in R<sup>2</sup>.<br>
<br>
Here we can see that the lenght parallel the x-axis, is "x<sub>2</sub>-x<sub>1</sub>".<br>
And that the lenght parallel the y-axis, is "y<sub>2</sub>-y<sub>1</sub>".<br>
<br>
In our specific example in figure 4, we have x<sub>2</sub>-x<sub>1</sub> = 5 - 2 = 3.<br>
And for the y part, we have y<sub>2</sub>-y<sub>1</sub> = 7 - 3 = 4.<br>
<br>
Applying the "Pythagorean theorem", we find:<br>
<h3>|PP'|<sup>2</sup> = (x<sub>2</sub> - x<sub>1</sub>)<sup>2</sup> + (y<sub>2</sub> - y<sub>1</sub>)<sup>2</sup></h3>
Thus:<br>
<h3>|PP'| = √ ( (x<sub>2</sub> - x<sub>1</sub>)<sup>2</sup> + (y<sub>2</sub> - y<sub>1</sub>)<sup>2</sup>) )</h3>
<font color="brown">
<h3>In R<sup>3</sup>:</h3>
<font color="black">
For R<sup>3</sup>, we simply have one additional coordinate. So, we would have:<br>
<h3>|PP'|<sup>2</sup> = (x<sub>2</sub> - x<sub>1</sub>)<sup>2</sup> + (y<sub>2</sub> - y<sub>1</sub>)<sup>2</sup> + (z<sub>2</sub> - z<sub>1</sub>)<sup>2</sup></h3>
Thus:<br>
<h3>|PP'| = √ ( (x<sub>2</sub> - x<sub>1</sub>)<sup>2</sup> + (y<sub>2</sub> - y<sub>1</sub>)<sup>2</sup>) + (z<sub>2</sub> - z<sub>1</sub>)<sup>2</sup>) )</h3>
<font color="brown">
<h3>In R<sup>n</sup>:</h3>
<font color="black">
Suppose we have two points "P" and "Q" in R<sup>n</sup>, with the coordinates:<br>
<br>
(p<sub>1</sub>, p<sub>2</sub>, .. ,p<sub>n</sub>) and (q<sub>1</sub>, q<sub>2</sub>, .. ,q<sub>n</sub>)<br>
<br>
then:<br>
<br>
<h3>|PQ|<sup>2</sup> = (p<sub>1</sub> - q<sub>1</sub>)<sup>2</sup> + .. + (p<sub>n</sub> - q<sub>n</sub>)<sup>2</sup>)</h3>
Thus:<br>
<h3>|PQ| = √ ( (p<sub>1</sub> - q<sub>1</sub>)<sup>2</sup> + .. + (p<sub>n</sub> - q<sub>n</sub>)<sup>2</sup>) )</h3>
In general, a "distance", is quite often denoted by "S" or "s", so you may also use that in equations.<br>
<br>
Note that a term like (p<sub>n</sub> - q<sub>n</sub>)<sup>2</sup> is equivalent to (q<sub>n</sub> - p<sub>n</sub>)<sup>2</sup>.<br>
This is so since the two have the same absolute value, but may differ in "sign" (+ or -). But, since we square it, the end result is the same.<br>
<br>
<br>
<font color="blue">
<h1>Chapter 5. Intersections of lines:</h1>
<font color="black">
<font color="blue">
<h3>Example of the "calculus" method in R<sup>2</sup>:</h3>
<font color="black">
In note 2 (linear equations), we investigated how to find the "intersection" of two lines in R<sup>2</sup>.<br>
In R<sup>2</sup>, if two lines are not "parallel", then they will intersect "somewhere".<br>
<br>
In note 2, we used the following example:<br>
<br>
<font color="brown">
Suppose we have the following two lines:<br>
<br>
y= -3x - 3<br>
y= -x - 1<br>
<br>
At which point, do they intersect?<br>
<br>
One thing is for sure: the point where the lines intersect, is the same (x,y) for both equations.<br>
Thus we may say:<br>
<br>
-3x + 3 = -x - 1 =><br>
-2x = -4 =><br>
<B>x = 2</B>.<br>
<br>
Thus at the intersection, x must be "2". Now use one of both equations to find the corresponding y. Let's use "y= -x - 1" :<br>
<br>
y = -x -1 => y = -2 -1 => <B>y = -3</B>.<br>
<br>
So, the point where both lines intersect is (2,-3).<br>
<font color="black">
<br>
<font color="blue">
<h3>Example of the "vector" method in R<sup>3</sup>:</h3>
<font color="black">
Since the dawn of mankind, or slightly later, it was already known that you only need 2 points to completely define a line.<br>
<br>
Again we are going to see how to determine where (at which point) two lines intersect. However, this time we will use linear algebra.<br>
The method shown here, works the same way in vectorspaces of all dimensions (e.g. R<sup>3</sup>, R<sup>4</sup> etc...).<br>
<br>
In figure 5 below, I tried to draw 2 lines in a Cartesian coordinate system (R<sup>3</sup>).<br>
Hopefully, you can see a green line and an orange one.<br>
<br>
<B>Figure 5. Example lines in R<sup>3</sup> (2 points A and B is enough to describe any line)</B><br>
<br>
<img src="vpart2_7.jpg" align="centre"/>
<br>
<br>
-Let's focus on the green line for a moment.<br>
<br>
Say that we have two points on that line, A and B. Then we also have the vectors <B>A</B> and <B>B</B>,<br>
depicted as arrows, originating from the origin.<br>
By the way, it does not matter at all, where those two points are, as long as they are on that line.<br>
<br>
You may wonder how we can write down an equation, by which we can "address" any random point (x,y,z) on that line.<br>
Well, here it is:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
│ y │<br>
└ z ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
<B>A</B> + λ (<B>B</B> - <B>A</B>)
</TD>
</TR>
</TABLE>
<br>
It's just a matter of vector addition. The vector (<B>B</B> - <B>A</B>), is the yellow part, and <B>lies on</B> the line.<br>
By varying the scalar λ, you can reach any point on the line (e.g. λ=0.3, or λ=5 etc...).<br>
<br>
You should see it this way: use vector <B>A</B>, to "step" on the line, and then you can use λ(<B>B</B> - <B>A</B>) to reach any point on the line.<br>
<br>
-Now, focus on the orange line.<br>
<br>
A similar argument can be used, and we can "address" any random point (x,y,z) on the orange line line, by using:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
┌ x ┐<br>
│ y │<br>
└ z ┘
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
<TD> <font color="brown" face="courier">
<B>C</B> + μ (<B>D</B> - <B>C</B>)
</TD>
</TR>
</TABLE>
<br>
Now, suppose in row vector notation, we have:<br>
<br>
A = (a<sub>1</sub>,a<sub>2</sub>,a<sub>3</sub>)<br>
B = (b<sub>1</sub>,b<sub>2</sub>,b<sub>3</sub>)<br>
C = (c<sub>1</sub>,c<sub>2</sub>,c<sub>3</sub>)<br>
D = (d<sub>1</sub>,d<sub>2</sub>,d<sub>3</sub>)<br>
<br>
If the two lines really intersect, then at that point, we have the same x, y, z.<br>
<br>
Thus, it must hold at that point, that:<br>
<br>
<TABLE border=0>
<TD> <font color="brown" face="courier">
<B>A</B> + λ (<B>B</B> - <B>A</B>)
</TD>
<TD> <font color="brown" face="courier">
=
</TD>
</TD>
<TD> <font color="brown" face="courier">
<B>C</B> + μ (<B>D</B> - <B>C</B>)
</TD>
</TR>
</TABLE>
<br>
If we write that out, we have a system of 3 linear equations:<br>
<br>
a<sub>1</sub> + λ (b<sub>1</sub> - a<sub>1</sub>) = c<sub>1</sub> + μ (d<sub>1</sub> - c<sub>1</sub>)<br>
a<sub>2</sub> + λ (b<sub>2</sub> - a<sub>2</sub>) = c<sub>2</sub> + μ (d<sub>2</sub> - c<sub>2</sub>)<br>
a<sub>3</sub> + λ (b<sub>3</sub> - a<sub>3</sub>) = c<sub>3</sub> + μ (d<sub>3</sub> - c<sub>3</sub>)<br>
<br>
Do not forget that the a<sub>1</sub>, b<sub>1</sub> etc..., are simply known values, since we know the coordinates of A, B, C, and D.<br>
The set of equations then boils down to resolving λ and μ, which is possible by substituting.<br>
I am not going to work this out any further. For me, it's only important that you grasp <I>the method of handling</I> this problem.<br>
<br>
I agree that solving the set of three linear equations is quite some work, but the method is generic for multiple dimensions.<br>
Suppose we have the same problem in R<sup>4</sup>. Then only one extra coordinate is involved (for all 4 points),<br>
but the principle really stays the same.<br>
<br>
<br>
<br>
<font color="blue">
<h3><I>That's it. Hope you liked it !</I></h3>
<h3><I>The next note will explore some more advanced differentials like the Grad, Diff, and Curl operators.</I></h3>
<font color="black">
<br>
<br>
<br>
<br>
<br>
</body>
</html>