1 Algebra

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

UNENE Math Refresher Course

Algebra

1
Algebra — Exponential Functions © Wei-Chau Xie

Exponential Functions

y = ax is an exponential function.

Properties

1. a0 = 1, a6= 0

2. am · an = am+n
1 −n, am m−n ,
3. = a = a a6= 0
an an
4. (am)n = am·n

5. (a b)n = an · bn
 a n an
6. = n
b b

2
Algebra — Exponential Functions © Wei-Chau Xie

For the special case y = ex, e = 2.718281828 . . .

20
e−x ex

15

10

e−x → 0, when x → ∞
−3 −2 −1 0 1 2 3
x

3
Algebra — Logarithmic Functions © Wei-Chau Xie

Logarithmic Functions

If x = a y, a >0, a 6= 1 =⇒ y = loga x, where a is called the base.

Properties

1. a = a1 =⇒ loga a = 1

2. 1 = a0 =⇒ loga 1 = 0

3. loga b x = x loga b

4. loga x + loga y = loga (x y)


x
5. loga x − loga y = loga
y

6. aloga x = x
log b x
7. loga x =
log b a
4
Algebra — Logarithmic Functions © Wei-Chau Xie

In mathematics and engineering, the most frequently used bases: a = 10 and e.

a = 10 : log10 x = lg x
a=e: loge x = ln x

3
lnx
2

1
x
0
1 2 4 6 8 10
−1

−2

−3

−4

−5

5
Algebra — Exponential and Logarithmic Functions © Wei-Chau Xie

Example
1
ln x2 − ln
x
Simplify y= √3
.
ln x

ln x2 − ln x−1 2 ln x − (− ln x) 3 ln x
y= = = =9
1 1 1
3 ln x 3 ln x
3
ln x

6
Algebra — Exponential and Logarithmic Functions © Wei-Chau Xie

Example
 
4
Solve for x in equation 20 = 500 1 − .
4 + e−0.002x

1 4
Divide the equation by 500: =1−
25 4 + e−0.002x

4 24 25
Simplify: = =⇒ 4 + e−0.002x =
4 + e−0.002x 25 6

1
e−0.002x =
6

1
Take ln of both sides: ln e−0.002x = ln =⇒ − 0.002 x = − ln 6
6

1
∴ x= ln 6 = 895.8797
0.002

7
Algebra — Exponential and Logarithmic Functions © Wei-Chau Xie

Example
b
• Given that y = y0 e−ax , x >0, solve for x.

• If y = 0.1, y0 = 10.2, a = 0.5, b = 2.1, evaluate x.

Taking ln of both sides of the equation


−axb
ln y = ln y0 + ln e
= ln y0 − axb
ln y0 − ln y  ln y − ln y  1
b 0 b
∴ x = =⇒ x =
a a
For y = 0.1, y0 = 10.2, a = 0.5, b = 2.1
 ln 10.2 − ln 0.1  1 1
2.1 2.1
x= = 9.2499 = 2.88
0.5

8
Algebra — Graphs © Wei-Chau Xie

Graphs of Functions
2
The following figure shows a plot of functions y = 2x, 5x, 10x, ex .

It is obvious that we cannot see any detail of 2x for all values of x and not much
x x x 2
details of 5 , 10 , e for x< 2.

9
Algebra — Graphs © Wei-Chau Xie

2
ex
10000 10x
9500

9000

8500

8000

7500

7000

6500

6000

5500

y 5000

4500

4000

3500

3000

2500

2000

1500

1000

5x
500

2x
0 1 2 3 4
x
10
Algebra — Semi-Log Graphs © Wei-Chau Xie

Semi-Log Graphs

The same functions plotted using a semi-logarithmic scale. Details are revealed
for all values of x.

For semi-log plots, the numbers along the horizontal x-axis are (linearly)
evenly spaced, while along the vertical y-axis, powers of 10 are evenly spaced.
For exponential function y = ax, a >0, taking logarithm of both sides gives

log10 y = x · log10 a
The function appears as a straight line when plotted on semi-log paper.

11
Algebra — Semi-Log Graphs © Wei-Chau Xie

2
10000 ex
9000
10x
8000
7000
6000
5000
4000
3000

2000

1000
900
800
700
600 5x
500
400
300

200

y 100
90
80
70
60
50
40
30

20
2x
10
9
8
7
6
5
4
3

1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9
3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9
4
x
12
Algebra — Log-Log Graphs © Wei-Chau Xie

Log-Log Graphs
2 2
The following figure shows a plot of functions y = x2, x3, x4, e x , e−x plotted
using the logarithmic scales (both axes using log scales), in which powers of 10
are evenly spaced.

For function y = x a, x >0, taking logarithm of both sides gives

log10 y = a · log10 x
The function appears as a straight line when plotted on log-log paper.

13
Algebra — Log-Log Graphs © Wei-Chau Xie
10000
9000
8000
x4
7000
6000
5000
4000
3000

2000
2
ex
1000
900
800
x3
700
600
500
400
300

200

100
90
80
x2
70
60
50
40
30

20

10
9
8
7
6
5
4
3

y 0.91
0.8
0.7
0.6
0.5
0.4
0.3

0.2

0.1
0.09
0.08
0.07
0.06
0.05
0.04
0.03

0.02

0.01
0.009
0.008
0.007
0.006
0.005
0.004
0.003

0.002

0.001
0.0009
0.0008
0.0007
0.0006
0.0005
0.0004
0.0003

0.0002
2
0.0001 e−x
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 3 4 5 6 7 8 9 10
x
14
Algebra — Vectors © Wei-Chau Xie

Vectors

Let î, ĵ, k̂ be the unit vectors in the x-, y-, z-directions, respectively.
y

v

î x
O a

c
z

A vector v is v = a î + b ĵ + c k̂

☞ A vector is printed in boldface v, or written as ⇀


va in handwriting.
p
The norm (length) of a vector is v = |v| = a2 + b2 + c2
v
The unit vector in direction v is v̂ =
|v|
15
Algebra — Vector Addition © Wei-Chau Xie

Vector Addition

Let v1 = a1 î + b1 ĵ + c1 k̂, v2 = a2 î + b2 ĵ + c2 k̂.

v = v1 + v2 = v2 + v1
= (a1 î + b1 ĵ + c1 k̂) + (a2 î + b2 ĵ + c2 k̂)
= (a1 +a2) î + (b1 +b2) ĵ + (c1 +c2) k̂
Graphically, the sum v = v1 +v2 +v3 is obtained by placing them head to tail
and drawing the vector v from the free tail to the free head.
v3
The tail of v3 is placed
v =v1 + v2 + v3
at the head of v2
v2

v2
v3 v1 v1 The tail of v2 is placed
at the head of v1

16
Algebra — Dot Product of Vectors © Wei-Chau Xie

Dot Product of Vectors

Let v1 = a1 î + b1 ĵ + c1 k̂, v2 = a2 î + b2 ĵ + c2 k̂.


v2

· ·
v1 v2 = (a1 î + b1 ĵ + c1 k̂) (a2 î + b2 ĵ + c2 k̂)
θ v1
= a 1 a 2 + b1 b2 + c 1 c 2 A scalar

= v1 v2 cos θ

The projection of vector v in a given direction, specified by the unit vector


û, is given by
·
v û = v cos θ
v

θ û
. ˆ = v cos θ
v u

17
Algebra — Cross Product of Vectors © Wei-Chau Xie

Cross Product of Vectors

Let v1 = a1 î + b1 ĵ + c1 k̂, v2 = a2 î + b2 ĵ + c2 k̂.




î ĵ k̂ î ĵ

v1 × v2 = a1 b1 c1 a1 b1


a 2 b2 c 2 a 2 b2

= (b1 c2 −b2 c1) î + (c1 a2 −c2 a1) ĵ + (a1 b2 −a2 b1) k̂ A vector

Direction obtained using the right-hand rule: flatten the right hand, four
fingers go along v1, then curl the fingers (palm) towards v2; the direction of
the thumb is the direction of v1 ×v2.
v = v1×v2
v2

θ v1

Magnitude v × v = v v sin θ
1 2 1 2

18
Linear Algebra — Solutions of Systems of Linear Equations © Wei-Chau Xie

Gaussian Elimination
Solve the following system of linear algebraic equations

3x1 + 4x2 = 10 (1)


2x1 − 5x2 = −1 (2)
To solve for x1, i.e., to eliminate x2,
Eqn. (1) × 5 : 15x1 + 20x2 = 50
Eqn. (2) × 4 : 8x1 − 20x2 = −4 (+
23x1 = 46 =⇒ x1 = 2
Similarly, to solve for x2, i.e., to eliminate x1,
Eqn. (1) × 2 : 6x1 + 8x2 = 20
Eqn. (2) × 3 : 6x1 − 15x2 = −3 (−
23x2 = 23 =⇒ x2 = 1

Alternatively, having obtained x1, x2 can be found from either Eqn. (1) or (2).
10 − 3x1 10 − 3×2
From Eqn. (1): x2 = = =1
4 4
19
Linear Algebra — Systems of Linear Equations © Wei-Chau Xie

Consider a system of n linear algebraic equations

a11 x1 + a12 x2 + · · · + a1n xn = b1


a21 x1 + a22 x2 + · · · + a2n xn = b2
··· ···
an1 x1 + an2 x2 + · · · + ann xn = bn
where x1, x2, . . . , xn are the n unknowns.

The system can be written in the matrix form


    
a11 a12 · · · a1n   x1 
 
 b1 

 
   
  
a21 a22 · · · a2n  x2 b2
 . .. .. ..  . = . =⇒ A x = b
 .  . 
 .
 
     
an1 an2 · · · ann xn bn
| {z } | {z } | {z }
A x b
where A is the coefficient matrix, x is the column vector of unknowns, and b is
the column vector of right-hand side constants.

20
Linear Algebra — Matrix © Wei-Chau Xie

Operations of Matrices

Addition of Matrices

Let A = [ aij ] , B = [ bij ] . A and B must be the same size.


m×n m×n

C = A + B =⇒ cij = aij +bij

A + B = B + A, (A + B) + C = A + (B + C)
" # " # " #
a11 a12 a13 b11 b12 b13 a11 +b11 a12 +b12 a13 +b13
+ =
a21 a22 a23 b21 b22 b23 a21 +b21 a22 +b22 a23 +b23

Multiplication by a Scalar

Let A = [ aij ] . C = αA =⇒ cij = αaij, α is a scalar.


m×n
" # " #
a11 a12 a13 αa11 αa12 αa13
α =
a21 a22 a23 αa21 αa22 αa23

21
Linear Algebra — Matrix © Wei-Chau Xie

Multiplication of Matrices

Let A = [ aik ] , B = [ bkj ]


m×n n×l

n
X
C = AB =⇒ cij = ai1b1j + ai2b2j + · · · + ainbnj = aikbkj
k=1
 
 . .. .  · · · b1j ···  
. ··· .   .
.
· · · b2j · · ·
a a
 i1 i2 · · · ain
 =
· · · cij · · ·

.. .. .

· · · .. 
· · · ..
··· . 
· · · bnj ···
ith row jth column ijth element

AB is usually not the same as BA.

   
a11 a12 " # a11b11 +a12b21 a11b12 +a12b22
  b11 b12  
a21 a22 = a21b11 +a22b21 a21b12 +a22b22
b21 b22
a31 a32 a31b11 +a32b21 a31b12 +a32b22

22
Linear Algebra — Matrix © Wei-Chau Xie

Transpose of Matrices

Let A = [ aij ] =⇒ Transpose of A : AT = [ aji ]


m×n n×m

 T
a11 a12 " #
  a11 a21 a31
a21 a22 =
a12 a22 a32
a31 a32 3×2 2×3

Properties

(AT)T = A
(A + B)T = AT + BT
(AB)T = BTAT
(αA)T = α AT, α is a scalar

23
Linear Algebra — Determinant © Wei-Chau Xie

Determinant
The determinant of a square matrix A is denoted as
 
11 a12 · · · a11 a12 · · · a1n
a a1n
 
A = det(A) = a21 a22 · · · a2n a21 a22 · · · a2n 

.. .. .. .. = det 
 .. .
. .
. .
. 


n1 an2 · · · an1 an2 · · · ann
a ann

Evaluation of Determinants

a11 a12
|A| = = +a11a22 − a21a12 2×2 determinant
a21 a22

a11 a12 a13 a11 a12


To evaluate the 3×3 determinant,
|A| = a21 a22 a23 a21 a22
copy first two columns at right.
a31 a32 a33 a31 a32
= +a11a22a33 + a12a23a31 + a13a21a32 − a31a22a13 − a32a23a11 − a33a21a12
24
Linear Algebra — Solutions of Systems of Linear Equations © Wei-Chau Xie

Cramer’s Rule
For the following system of n linear algebraic equations
a11 x1 + a12 x2 + · · · + a1n xn = b1
a21 x1 + a22 x2 + · · · + a2n xn = b2
··· ···
an1 x1 + an2 x2 + · · · + ann xn = bn
the solutions are given by
1i
xi = i = 1, 2, . . . , n, 1 6= 0
1
where 1 is the determinant of coefficient matrix, 1i is the determinant of the
coefficient matrix with the ith column replaced by the right-hand side vector, i.e.,

a a · · · a a 11 · · · a 1,i−1 b 1 a 1,i+1 · · · a 1n

11 12 1n




a21 a22 · · · a2n a21 · · · a2,i−1 b2 a2,i+1 · · · a2n
1= . .. · · · .. , 1i = .

.. .. ..
.
. · · · · · · · · ·

a
n1 a n2 · · · a nn
a n1 · · · a n,i−1 b n a n,i+1 · · · a nn
|{z}
ith column
25
Linear Algebra — Cramer’s Rule © Wei-Chau Xie

Example
Solve the following system of linear algebraic equations

3x1 + 4x2 = 10
2x1 − 5x2 = −1


3 4

1= = 3 · (−5) − 2 · 4 = −23
2 −5

10 4

11 = = 10 · (−5) − (−1) · 4 = −46
−1 −5

3 10

12 = = 3 · (−1) − 2 · 10 = −23
2 −1
Apply Cramer’s Rule
11 −46 12 −23
x1 = = = 2, x2 = = =1
1 −23 1 −23
26
Linear Algebra — Cramer’s Rule © Wei-Chau Xie

Example
Solve the following system of linear algebraic equations
4 y − 3z = 3
−x + 7 y − 5z = 4
−x + 8 y − 6z = 5

Determinant of the coefficient matrix



0 4 −3 0 4


1 = −1 7 −5 −1 7

−1 8 −6 −1 8

= 0·7·(−6) + 4·(−5)·(−1) + (−3)·(−1)·8


− (−1)·7·(−3) − 8·(−5)·0 − (−6)·(−1)·4
= 0 + 20 + 24 − 21 − 0 − 24 = −1

27
Linear Algebra — Cramer’s Rule © Wei-Chau Xie


3 4 −3 3 4


11 = 4 7 −5 4 7 Replace the first column by RHS vector.

5 8 −6 5 8

= 3·7·(−6) + 4·(−5)·5 + (−3)·4·8 − 5·7·(−3) − 8·(−5)·3 − (−6)·4·4


= −126 − 100 − 96 + 105 + 120 + 96 = −1

0 3 −3 0 3


12 = −1 4 −5 −1 4 Replace the second column by RHS vector.

−1 5 −6 −1 5

= 0·4·(−6) + 3·(−5)·(−1) + (−3)·(−1)·5


− (−1)·4·(−3) − 5·(−5)·0 − (−6)·(−1)·3
= 0 + 15 + 15 − 12 − 0 − 18 = 0

28
Linear Algebra — Cramer’s Rule © Wei-Chau Xie


0 4 3 0 4


13 = −1 7 4 −1 7 Replace the third column by RHS vector.

−1 8 5 −1 8

= 0·7·5 + 4·4·(−1) + 3·(−1)·8 − (−1)·7·3 − 8·4·0 − 5·(−1)·4


= 0 − 16 − 24 + 21 − 0 + 20 = 1

Apply Cramer’s Rule


11 −1 12 0 13 1
x= = = 1, y= = = 0, z= = = −1
1 −1 1 −1 1 −1

29
Linear Algebra — Systems of Homogeneous Linear Equations © Wei-Chau Xie

Systems of Homogeneous Linear Equations


When the right-hand side constants b1 = b2 = · · · = bn = 0, the system of linear
algebraic equations is homogeneous

a11 x1 + a12 x2 + · · · + a1n xn = 0


a21 x1 + a22 x2 + · · · + a2n xn = 0
··· ···
an1 x1 + an2 x2 + · · · + ann xn = 0

The system of homogeneous linear equations has zero solution, i.e.

x1 = x2 = · · · = xn = 0
If the determinant of the coefficient matrix 1 6= 0, then the system of
homogeneous linear equations does not have non-zero solutions.
For the system of homogeneous linear equations to have non-zero solutions,
the determinant of the coefficient matrix 1 = 0.

30
Linear Algebra — Eigenvalues and Eigenvectors © Wei-Chau Xie

Eigenvalues and Eigenvectors


Consider the following system of homogeneous linear equations

Ax = λx or (A − λI) x = 0 (*)
where I is the n×n unit matrix, i.e.,
 
1 0 0 ··· 0
 
0 1 0 ··· 0
I = . . .. .. 
. . ··· 
0 0 0 ··· 1

For the system of homogeneous linear equations (*) to have non-zero


solutions, the determinant of the coefficient matrix must be zero, i.e.,

A − λ I = 0

which is called the characteristic equation.


The solutions (roots) λ of the characteristic equation are called eigenvalues.
The corresponding solutions of system (*) are called eigenvectors.
31
Linear Algebra — Eigenvalues © Wei-Chau Xie

Example
Find the value of λ such that the equations
(3 − λ) x1 − 3 x2 + x3 = 0
2 x1 − (2 + λ) x2 + 2 x3 = 0
−x1 + 2 x2 − λ x3 = 0

have non-zero solutions.

Characteristic equation (setting the determinant of the coefficient matrix to zero)



3−λ −3 1 3−λ −3


1 = 2 −2−λ 2 2 −2−λ

−1 2 −λ −1 2
= (3−λ)·(−2−λ)·(−λ) + (−3)·2·(−1) + 1·2·2
− (−1)·(−2−λ)·1 − 2·2·(3−λ) − (−λ)·2·(−3)
= −λ3 + λ2 − 2 = −λ3 − λ2 + 2λ2 − 2
= −λ2(λ+1) + 2(λ−1)(λ+1) = −(λ+1)(λ2 −2λ+2) = 0
32
Linear Algebra — Eigenvalues © Wei-Chau Xie

∴ (λ + 1)(λ2 − 2λ + 2) = 0

λ + 1 = 0 =⇒ λ = −1

λ2 − 2λ + 2 = 0:
p √
−(−2) ± (−2)2 −4·1·2 2± −4 √
λ= = = 1 ± i, i = −1
2·1 2

33
Linear Algebra — Eigenvalues © Wei-Chau Xie

Alternative Method for Solving the Characteristic Equation −λ3 +λ2 −2 = 0

By trial-and-error, find a root of the characteristic equation

−(−1)3 + (−1)2 − 2 = 0 =⇒ λ= −1 is a root =⇒ (λ+1) is a factor.


Use long division to find the other factor as follows
−λ2 + 2λ − 2

λ + 1 −λ3 + λ2

− 2
−λ3 − λ2 (−
2λ2 − 2
2λ2 + 2λ (−
− 2λ − 2
− 2λ − 2 (−
0
The characteristic equation becomes (λ + 1)(−λ2 + 2λ − 2) = 0.

34
Linear Algebra — Eigenvalues and Eigenvectors © Wei-Chau Xie

Example
Find the eigenvalues λ and the corresponding eigenvectors of
" #( ) ( )
1−λ 4 x1 0
(A − λI)x = =
1 −2−λ x2 0

The characteristic equation is



1−λ 4
= (1−λ)(−2−λ) − 1·4 = λ2 + λ − 6 = (λ+3)(λ−2) = 0


1 −2−λ
The two eigenvalues are λ1 = −3, λ2 = 2.

λ = λ1 = −3:
" #( )
4 4 v11
(A−λ1I)v1 = = 0 =⇒ v11 + v21 = 0
1 1 v21
( ) ( )
v11 1
Taking v21 = −1, then v11 = −v21 = 1 =⇒ v1 = =
v21 −1
There is one equation for two unknowns.
One unknown can be solved in terms of the other unknown.
35
Linear Algebra — Eigenvalues and Eigenvectors © Wei-Chau Xie

λ = λ2 = 2:
" #( )
−1 4 v12
(A−λ2I)v2 = = 0 =⇒ v12 − 4v22 = 0
1 −4 v22
( ) ( )
v12 4
Taking v22 = 1, then v12 = 4v22 = 4 =⇒ v2 = =
v22 1

36

You might also like