没有合适的资源?快使用搜索试试~ 我知道了~
lab05.pdf
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 185 浏览量
2023-06-18
13:13:35
上传
评论
收藏 75KB PDF 举报
温馨提示
试读
12页
lab05.pdf
资源推荐
资源详情
资源评论
MATH2071: LAB 5: Norms, Errors and Whatnot
Intro duction Exercise 1
Vector Norms Exercise 2
Matrix Norms Exercise 3
Compatible Matrix Norms Exercise 4
More on the Spectral Radius Exercise 5
Typ es of Errors Exercise 6
A matrix example Exercise 7
Extra credit: the determinant Exercise 8
Exercise 9
Extra Credit
1 Introduction
The objects we work with in linear systems are vectors and matrices. In order to make statements about
the size of these objects, and the errors we make in solutions, we want to be able to describe the “sizes” of
vectors and matrices, which we do by using norms.
We then need to consider whether we can bound the size of the product of a matrix and vector, given
that we know the “size” of the two factors. In order for this to happen, we will need to use matrix and
vector norms that are compatible. These kinds of bounds will become very important in error analysis.
We will then consider the notions of forward error and backward error in a linear algebra computation.
We will then look at one useful matrix example: a tridiagonal matrix with well-known eigenvalues and
eigenvectors.
This lab will take two sessions. You may find it convenient to print the pdf version of this lab rather
than the web page itself.
2 Vector Norms
A vector norm assigns a size to a vector, in such a way that scalar multiples do what we expect, and the
triangle inequality is satisfied. There are four common vector norms in n dimensions:
• The L
1
vector norm
∥x∥
1
=
n
i=1
|x
i
|
• The L
2
(or “Euclidean”) vector norm
∥x∥
2
=
n
i=1
|x
i
|
2
• The L
p
vector norm
∥x∥
p
=
n
i=1
|x
i
|
p
1/p
• The L
∞
vector norm
∥x∥
∞
= max
i=1,...,n
|x
i
|
To compute the norm of a vector x in Matlab:
1
• ∥x∥
1
= norm(x,1);
• ∥x∥
2
= norm(x,2)= norm(x);
• ∥x∥
p
= norm(x,p);
• ∥x∥
∞
= norm(x,inf)
(Recall that inf is the Matlab name corresponding to ∞.)
Exercise 1: For each of the following column vectors:
x1 = [ 4; 6; 7 ]
x2 = [ 7; 5; 6 ]
x3 = [ 1; 5; 4 ]
compute the vector norms, using the appropriate Matlab commands. Be sure your answers are reason-
able.
L1 L2 L Infinity
x1 __________ __________ __________
x2 __________ __________ __________
x3 __________ __________ __________
3 Matrix Norms
A matrix norm assigns a size to a matrix, again, in such a way that scalar multiples do what we expect,
and the triangle inequality is satisfied. However, what’s more important is that we want to be able to mix
matrix and vector norms in various computations. So we are going to be very interested in whether a matrix
norm is compatible with a particular vector norm, that is, when it is safe to say:
∥Ax∥ ≤ ∥A∥ ∥x∥
There are four common matrix norms and one “almost” norm:
• The L
1
or “max column sum” matrix norm:
∥A∥
1
= max
j=1,...,n
n
i=1
|A
i,j
|
Remark: This is not the same as the L
1
norm of the vector of dimension n
2
whose components are
the same as A
i,j
.
• The L
2
matrix norm:
∥A∥
2
= max
j=1,...,n
λ
i
where λ
i
is a (necessarily real and non-negative) eigenvalue of A
H
A or
∥A∥
2
= max
j=1,...,n
µ
i
where µ
i
is a singular value of A;
2
• The L
∞
or “max row sum” matrix norm:
∥A∥
∞
= max
i=1,...,n
n
j=1
|A
i,j
|
Remark: This is not the same as the L
∞
norm of the vector of dimension n
2
whose components are
the same as A
i,j
.
• There is no L
p
matrix norm in Matlab.
• The “Frobenius” matrix norm:
∥A∥
fro
=
i,j=1,...,n
|A
i,j
|
2
Remark: This is the same as the L
2
norm of the vector of dimension n
2
whose components are the
same as A
i,j
.
• The spectral radius (not a norm):
ρ(A) = max |λ
i
|
(only defined for a square matrix), where λ
i
is a (possibly complex) eigenvalue of A.
To compute the norm of a matrix A in Matlab:
• ∥A∥
1
= norm(A,1);
• ∥A∥
2
= norm(A,2)=norm(A);
• ∥A∥
∞
= norm(A,inf);
• ∥A∥
fro
= norm(A,’fro’)
• See below for computation of ρ(A) (the spectral radius of A)
4 Compatible Matrix Norms
A matrix can be identified with a linear operator, and the norm of a linear operator is usually defined in the
following way.
∥A∥ = max
x=0
∥Ax∥
∥x∥
(It would be more precise to use sup rather than max here but the surface of a sphere in finite-dimensional
space is a compact set, so the supremum is attained, and the maximum is correct.) A matrix norm defined
in this way is said to be “vector-bound” to the given vector norm.
In order for a matrix norm to be consistent with the linear operator norm, you need to be able to say
the following:
∥Ax∥ ≤ ∥A∥ ∥x∥ (1)
but this expression is not necessarily true for an arbitrarily chosen pair of matrix and vector norms. When
it is true, then the two are “compatible”.
If a matrix norm is vector-bound to a particular vector norm, then the two norms are guaranteed to
be compatible. Thus, for any vector norm, there is always at least one matrix norm that we can use. But
that vector-bound matrix norm is not always the only choice. In particular, the L
2
matrix norm is difficult
(time-consuming) to compute, but there is a simple alternative.
Note that:
3
剩余11页未读,继续阅读
资源评论
卷积神经网络
- 粉丝: 338
- 资源: 8460
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功