Chapter 1: Errors: Methods of Approximation
Chapter 1: Errors: Methods of Approximation
Chapter 1: Errors
1.1 Introduction
Methods of approximation
1
BEKG 2452 Numerical Methods
1.1 Introduction
1.2 Errors
1.2.1 Floating Point System
𝑦 = ± 𝑚 × 𝑏𝑛
• m – mantissa
• b – base, e.g. base 10
• n – exponent
• If
0.1 ≤ m < 1
then the system is said to be normalised.
2
BEKG 2452 Numerical Methods
1 = +0.1000 101
−0.005 = (−0.5000)10−2
1
− = (−0.3333)100
3
[email protected]
error 𝑋𝑇 −𝑋𝐴
Relative error = =
true value 𝑋𝑇
3
BEKG 2452 Numerical Methods
1.2.3 Norm
𝐿1 norm
Definition:
The 𝑳𝟏 norm on ℝ𝑛 is given by
𝑛
𝐱 1 = 𝑥𝑖
𝑖=1
where 𝐱 = (𝑥1 , 𝑥2 , … 𝑥𝑛 )T
Example:
Let 𝐱 = (−1, 2, −3)T . Find the 𝐿1 norm of 𝐱.
Solution:
3
𝐱 1 = 𝑥𝑖 = −1 + 2 + −3 = 6
𝑖=1
4
BEKG 2452 Numerical Methods
Definition:
The 𝑳∞ norm on ℝ𝑛 is given by
𝐱 ∞ = max{ 𝑥𝑖 : 𝑖 = 1,2, … , 𝑛}
where 𝐱 = (𝑥1 , 𝑥2 , … 𝑥𝑛 )T
Example:
Let 𝐱 = (−1, 2, −3)T . Find the 𝐿∞ norm of 𝐱.
Solution:
Definition:
The 𝑳𝟐 norm on ℝ𝑛 is given by
𝑛 1/2
𝐱 2 = 𝑥𝑖2
𝑖=1
where 𝐱 = (𝑥1 , 𝑥2 , … 𝑥𝑛 )T
Example:
Let 𝐱 = (−1, 2, −3)T . Find the 𝐿2 norm of 𝐱.
Solution:
1/2
3
5
BEKG 2452 Numerical Methods
Definition:
The 𝑳𝒑 norm on ℝ𝑛 is given by
𝑛 1/𝑝
𝐱 = 𝑥𝑖 𝑝
𝑝
𝑖=1
where 𝐱 = (𝑥1 , 𝑥2 , … 𝑥𝑛 )T
Example:
Let 𝐱 = (−1, 2, −3)T and 𝑝 = 3. Find the 𝐿𝑝 norm of 𝐱.
Solution:
1/3
3
3 1/3 3
𝐱 3 = 𝑥𝑖 = 1 + 8 + 27 = 36
𝑖=1
Definition:
Let the 𝑖, 𝑗 entry of a matrix 𝐴 ∈ ℝ𝑛×𝑚 be denoted 𝑎𝑖𝑗 . Then the 1-norm
of a matrix is the maximum of the column sums of the absolute values of
the entries of the matrix:
𝑛
𝐴 1 = max 𝑎𝑖𝑗
𝑗
𝑖=1
Example:
Find the 1-norm of 𝐴 given:
1 −2 3
𝐴 = −6 5 4
7 −8 −9
Solution:
𝐴 1 = max 𝟏 + 𝟔 + 𝟕, 𝟐 + 𝟓 + 𝟖, 𝟑 + 𝟒 + 𝟗 = max 14, 15, 16 = 16
6
BEKG 2452 Numerical Methods
Definition:
Let the 𝑖, 𝑗 entry of a matrix 𝐴 ∈ ℝ𝑛×𝑚 be denoted 𝑎𝑖𝑗 . Then the ∞-norm
of a matrix is the maximum of the row sums of the absolute values of the
entries of the matrix :
𝑚
𝐴 ∞ = max 𝑎𝑖𝑗
𝑖
𝑗=1
Example:
Find the ∞-norm of 𝐴 given:
1 −2 3
𝐴 = −6 5 4
7 −8 −9
Solution:
𝐴 ∞ = max 𝟏 + 𝟐 + 𝟑, 𝟔 + 𝟓 + 𝟒, 𝟕 + 𝟖 + 𝟗 = max 6, 15, 24 = 24