TMV035 Analysis and Linear Algebra A, 2005

LECTURE 1.1

In this lecture we present a brief introduction to the mathematics courses. Then we introduce the number systems and functions. This covers AMBS Ch 5, 7, 9.

1. Introduction

You will have four obligatory mathematics courses:

• ALA-A. Goal: solve algebraic equation f(x) = 0.

Example.

x^{2} + 4x − 5 = 0
⇒ x = −1 or x = 5

• ALA-B. Goal: solve ordinary differential equation (ODE) u′(x) − f(x, u(x)) = 0.

Example.

u′(x) + u(x)^{2} = 0

⇒ u(x) = \frac{1}{x + c}

• ALA-C and Applied Mathematics. Goal: solve partial differential equation (PDE) of the

form −∇ · (a∇u) = f. The equations in the examples above are special equations for which there are explicit solution

formulas. For equations in the general forms, f(x) = 0, u′(x) − f(x, u(x)) = 0, −∇ · (a∇u) = f, there are no solution formulas. In our courses we emphasize solution methods for general equations, these methods construct solutions by means of algorithms that can also be implemented in computer programs. We shall spend a lot of time writing such programs in the Matlab environment. We shall also solve special equations with pencil and paper and solution formulas.

When we can solve general equations we can use them to model processes in chemical engineering. We shall do this together with the chemistry course.

In order to study algebraic equations, f(x) = 0, in ALA-A, we begin with the number systems and functions.

2. The natural numbers

The natural numbers are

N = {1, 2, 3, … }

These are the numbers that we use for counting how many elements that are contained in a set. We have two arithmetic operations (“räkneoperationer”): addition and multiplication. The sum m + n is the number of elements of the set which is the union of a set with m elements and a set with n elements. The product m · n is repeated addition:

m · n = n + n + ⋯ + n (m times)

They satisfy the following rules:

(1)

m + n = n + m,  m · n = n · m,  commutative laws
m + (n + p) = (m + n) + p,  m · (n · p) = (m · n) · p,  associative laws
m · (n + p) = m · n + m · p,  the distributive law

The associative laws mean that we may skip the parentheses and write m + n + p and m · n · p. We usually skip the · and write mn instead of m · n.

Date: September 16, 2005, Stig Larsson, Mathematical Sciences, Chalmers University of Technology.

We also define the power (“potens”) by repeated multiplication:

(2)  n^{m} = n · n … n (m times)

It useful to represent the natural numbers by marking them on the number line.

There is also a natural order relation (“ordningsrelation”) between the natural numbers: we know what it means to say that m is less than n, m < n. We may then introduce the related notation m > n, m ≤ n, m ≥ n.

There is a concept of subtraction for m ≥ n, namely, m − n is the number of elements that remain if we remove a subset of n elements from a set of m elements, with zero being the number of elements of the empty set, i.e., 0 = m − m.

Note the special roles played by the numbers 0 and 1:

(3)  m + 0 = m, m · 1 = m.

In order to solve equations of the form m + x = n with solution x = n − m for arbitrary natural numbers m, n we need to introduce negative numbers.

3. The integers

The integers (“de hela talen”) are

Z = {…, −3, −2, −1, 0, 1, 2, 3, … }

Here we have invented new numbers as follows: 0 (zero) and for each n ∈ N a negative number denoted −n. It useful to represent these numbers by marking them on the number line.

We extend the addition and the multiplication to these new numbers as follows: (here m, n ∈ N)

m + 0 = m, 0 + 0 = 0, m + (−n) = \begin{cases}m − n & if m ≥ n, \\ −(n − m) & if m > n, \end{cases}

m · 0 = 0, 0 · 0 = 0, m · (−n) = −(m · n), −(m) · (−n) = m · n.

Here we relate operations involving negative numbers to the corresponding operations for positive numbers. In this way all the arithmetic rules in (1) hold also for the integers, i.e, for m, n, p ∈ Z.

The order relation, m < n, is also extended to all integers m, n ∈ Z. We define intervals of integers:

(4)  \begin{matrix}(m, n) = \{x ∈ Z : m < x < n\} \\ [m, n] = \{x ∈ Z : m ≤ x ≤ n\} \\ (m, ∞) = \{x ∈ Z : m < x\} \\ (−∞, n) = \{x ∈ Z : x < n\} \end{matrix}

Note that {x ∈ Z : m < x < n} reads “the set of all x that belong to Z such that x is between m and n”.

Example.

(−1, 3) = {0, 1, 2}
[−1, 3) = { − 1, 0, 1, 2}
[0, ∞) = Z^{+} = {0, 1, 2, … } the nonnegative integers

We can now define subtraction for all integers:

m − n = m + (−n)

And we can solve the equation m + x = n as follows:

m + x = n ⇒ m + x + (−m) = n + (−m) ⇒ x + m + (−m) = n + (−m)
⇒ x + 0 = n + (−m) ⇒ x = n + (−m) = n − m.

In order to solve equations of the form m · x = n with solution x = n/m for arbitrary integers m, n, m ≠ 0, we need to introduce rational numbers.

4. The rational numbers

The rational numbers (“de rationella talen”) are

Q = \{x = \frac{p}{q} : p, q ∈ Z, q ≠ 0\}

Since we have not yet defined a fraction p/q, we should first define the rational numbers as the set of all pairs x = (p, q) with p, q ∈ Z, q ≠ 0, where p and q are supposed to represent the numerator and denominator, respectively. We extend addition and multiplication, for x = (p, q), y = (r, s),

x + y = (s · p + r · q, q · s), x · y = (p · r, q · s)

which are suggested by the expected formulas

x + y = \frac{p}{q} + \frac{r}{s} = \frac{s · p + r · q}{q · s} , x · y = \frac{p}{q} · \frac{r}{s} = \frac{p · r}{q · s}

In this way all the arithmetic rules in (1) hold also for the rational numbers.

We also define the inverse of x:

x^{−1} = (p, q)^{−1} = (q, p) for x ≠ 0

We can now define division:

\frac{y}{x} = y · x^{−1} = (r · q, s · p) for x ≠ 0

and we write the rational numbers in fractional form:

x = (p, q) = \frac{p}{q}

The integers are identified with the rational numbers that have the denominator = 1:

p = (p, 1) = \frac{p}{1}

We can now solve the equation a · x = b for a, b ∈ Z, a ≠ 0:

a · x = b ⇒ a^{−1} · a · x = a^{−1} · b ⇒ 1 · x = a^{−1} · b ⇒ x = a^{−1} · b = \frac{b}{a}

The order relation, x < y, can also be extended to rational numbers. We note (without proof) the important implication (where a, b, c ∈ Z)

a < b ⇒ \begin{cases}ca < cb & if c > 0 \\ ca > cb & if c < 0 \end{cases} (5)

In order to measure the size of a rational number, irrespective of its sign, we define absolute value (“absolutbelopp”)

|x| = \begin{cases}x & if x ≥ 0 \\ −x & if x < 0 \end{cases}

Note that |x| is the distance of x from zero, and |x − y| is the distance from x to y measured along the number line.

Note the following:

| − x| = |x| (6)

|xy| = |x||y| (7)

|x|^{2} = x^{2} (8)

x ≤ |x| (9)

Prove them!

The following inequality is very important.

Theorem. (The triangle inequality)

(10)  |a + b| ≤ |a| + |b|, a, b ∈ Z.

Proof. If one of a, b is zero, then (10) holds with equality. So we may assume that both a, b ≠ 0. It is easier to compute with the square instead of the absolute value, so we use (8) and then (7) and (9) to get

|a + b|^{2} = (a + b)^{2} = a^{2} + 2ab + b^{2} ≤ a^{2} + |2ab| + b^{2} = |a|^{2} + 2|a||b| + |b|^{2} = (|a| + |b|)^{2}

It follows that |a + b| ≤ |a| + |b| if we use the next theorem with x = |a + b| and y = |a| + |b|. □

Theorem. If x, y > 0 then

x^{2} ≤ y^{2} ⇒ x ≤ y. (11)

Proof. Let x, y > 0 and x^{2} ≤ y^{2}. Assume that the conlusion is false, i.e., assume that y < x. Then multiply this inequality by the positive numbers y and x and use (5) to get

y^{2} < yx and xy < x^{2}.

It follows that y^{2} < x^{2}, which is a contradiction (“motsägelse”) to our assumption that x^{2} ≤ y^{2}. Hence the assumption y < x leads to a contradiction and it must be false. We conclude that x ≤ y. This kind of proof is called “proof by contradiction” (“motsägelsebevis”). □

So far we have discussed the basic properties of the integers and rational numbers. This should be familiar to you: you already know very well how to compute with these numbers.

You also know the real numbers, but we avoid using them until later. We need some preparations before we can introduce the real numbers. For example, we need decimal expansions.

5. Periodic decimal expansion of rational numbers

If we perform a long division (“liggande stolen”) of a rational number, then two things can happen: (i) the division stops after a finite number of decimals have been generated; or (ii) the division does not stop but the decimals repeat themselves. See AMBS p. 77.

\frac{3}{4} = 0.75

\frac{1}{3} = 0.33333333333 …

\frac{16}{7} = 2. \underbrace{285714} \underbrace{285714} \underbrace{285714} \underbrace{285714} …

In the first case we have a finite (“ändlig”) decimal expansion and the number can be expressed exactly in terms of powers of 10, e.g., \frac{3}{4} = 7·10^{−1} +5·10^{−2}. In the second case we have an infinite, periodic, decimal expansion and the number cannot be expressed exactly with powers of 10.

(Note, by the way, that also a finite decimal expansion can be considered to be periodic with trailing zeros repeated: \frac{3}{4} = 0.75000 …)

Suppose on the other hand that we have a periodic decimal expansion. Does it represent a rational number? If so: which number is it? Take, for example,

0.1818181818181818 …

Let p_{m} = 0.1818 … 18_{m} be the number that we get if we truncate it after m periods:

p_{m} = 0.181818 … 18_{m} (m times) = 18 · 10^{−2} + 18 · 10^{−4} + 18 · 10^{−6} + ⋯ + 18 · 10^{−2m}

= 18 · 10^{−2}(1 + 10^{−2} + 10^{−4} + ⋯ + 10^{−2m+2})

= 18 · 10^{−2}(1 + 10^{−2} + (10^{−2})^{2} + ⋯ + (10^{−2})^{m−1})

= 18 · 10^{−2} \frac{1 − (10^{−2})^{m}}{1 − 10^{−2}} = \frac{18}{10^{2} − 1}(1 − (10^{−2})^{m}) = \frac{18}{99}(1 − (10^{−2})^{m}) = \frac{2}{11}(1 − (10^{−2})^{m}).

Here we used the formula for a geometric sum:

1 + a + a^{2} + ⋯ + a^{m−1} = \frac{1 − a^{m}}{1 − a} , a ≠ 1,

with a = 10^{−2}. We find that

|\frac{2}{11} − p_{m}| = \frac{2}{11} · 10^{−2m} < 10^{−2m}.

This means that the distance between the rational numbers p_{m} and 2/11 is less than 10^{−2m}. In other words: p_{m} is an approximation of 2/11 with 2m − 1 correct decimals. By taking m large enough we can compute a decimal approximation of 2/11 which is correct to any number of decimals. This is what we mean when we write

\frac{2}{11} = 0.181818 …

Let

0. \underbrace{q_{1}q_{2} … q_{n}} \underbrace{q_{1}q_{2} … q_{n}} \underbrace{q_{1}q_{2} … q_{n}} …

be a periodic decimal expansion and let p_{m} be the number that we get if we truncate it after m periods. A similar calculation gives (see AMBS p. 80)

|\frac{q_{1}q_{2} … q_{n}}{10^{n} − 1} − p_{m}| < 10^{−2m}

and we conclude that p_{m} approximates the rational number

p = \frac{q_{1}q_{2} … q_{n}}{10^{n} − 1}

to 2m decimals. We write

\frac{q_{1}q_{2} … q_{n}}{10^{n} − 1} = 0. \underbrace{q_{1}q_{2} … q_{n}} \underbrace{q_{1}q_{2} … q_{n}} \underbrace{q_{1}q_{2} … q_{n}} …

Skip AMBS 7.9, 7.10, 8 on the first reading.

6. Functions

AMBS Ch. 9. We say that we have a function f if for each element x of one set D_{f} we can find exactly one element y = f(x) in some other set B. A function f therefore consists of three things:

(1) a rule: x ↦ f(x)

(2) a domain of definition (“definitionsmängd”):

D(f) = D_{f} = {x : f(x) is defined}

(3) a target set (“målmängd”) B where the values of the function are found. We then write

f : D_{f} → B

and

f : x ↦ y = f(x)

Note the different kinds of arrows for sets (→) and elements (↦).

We also define the range of f (“värdemängden”):

R(f) = R_{f} = {y ∈ B : y = f(x) for some x ∈ D_{f}}

It is often very difficult (and sometimes not important) to determine exactly what R_{f} is. We can always find a target set, it only specifies which kind of objects the f(x) are, for example, integers or rational numbers.

In mathematics the sets D_{f} and B are usually sets of numbers but they could be any kind of sets.

Example. f_{1}(x) = x^{2}, D_{f_{1}} = Z, B = Z. Alternatively, we could have taken B = Z^{+} the nonnegative integers. Then f_{1} : Z → Z and R_{f_{1}} = {0, 1, 4, 9, … } is the set of all squares. But it is not easy to determine exactly which numbers are included in this set. For example, if we are given a large nonnegative integer, we cannot easily say if it is the square of some integer.

Example. f_{2}(x) = x^{2}, D_{f_{2}} = Q, B = Q or B = Q^{+}. Then f_{2} : Q → Q and R_{f_{1}} = {y ∈ Q : y = x^{2}}. It is not easy to determine exactly which numbers are included in this set.

Note that these are different functions although the rule is y = x^{2} in both cases.

Often we only specify the rule y = f(x) but not D_{f} or B. Then it is understood that D_{f} is the largest possible set for which f is defined and B is obvious.

The graph of a function f is the set of pairs (x, y) where x ∈ D_{f} and y = f(x). If these are numbers then we can plot them in the xy-plane.

Example. f_{3}(x) = x^{2}, D_{f_{3}} = [0, 3] ⊂ Z, B = Z^{+}. The graph is

(0, 0), (1, 1), (2, 4), (3, 9)

Example. f_{4}(x) = x^{2}, D_{f_{4}} = [0, 2] ⊂ Q, B = Q^{+}. The graph now consists of infinitely many points and we cannot compute all of them. Then we choose a stepsize h and compute the points (nh, (nh)^{2}), n = 0, 1, 2, …, as long as nh ≤ 2. For example, with h = .1

(0, 0), (0.1, 0.01), (0.2, 0.04), …, (2, 4)

This is easy to do with Matlab:

>>x=0:0.1:2
>>y=x.^2
>>plot(x,y)

A function may be considered as a “mapping” (“avbildning”) or an “operator”. We often use these words as synonyms to the word “function”.

Example. f(x) = −x, f : Q → Q.

Mapping: this is reflection in the origin (“spegling i origo”). For example, the interval (1, 2) is mapped (reflected) to the interval (-2,-1).

Operator: the operation “multiply by −1” is performed.

  /stig