1. Trang chủ
  2. » Luận Văn - Báo Cáo

Linear algebra project class cc11

20 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Linear Algebra
Tác giả Trần Vũ Đức Hoàng - 1711419, Nguyễn Ngọc Khải - 2052130, Trương Cao Thiện - 2053456, Hoàng Quốc Duy - 2052053
Người hướng dẫn Dr. Hoàng Hải Hà
Trường học Vietnam National University – Ho Chi Minh City
Thể loại Project
Năm xuất bản 2021
Thành phố Ho Chi Minh City
Định dạng
Số trang 20
Dung lượng 1,5 MB

Nội dung

Theory 1.1.1 Introduction of Inner product 1.1.2 Definition of Inner product 1.1.3 The properties of inner product 1.2.1 Definition of vector projection.. Problem 2: Write a program to

Trang 1

VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY –

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY

FACULTY OF APPLIED SCIENCES

LINEAR ALGEBRA

Project - Class CC11

Supervisors: Dr Hoàng Hải Hà

Authors: Trần Vũ Đức Hoàng - 1711419 Nguyễn Ngọc Khải - 2052130 Trương Cao Thiện - 2053456 Hoàng Quốc Duy - 2052053

June, 2021

Trang 2

INTRODUCTION

PROBLEM

TOPIC 1: INNER PRODUCT

1 Theory

1.1.1 Introduction of Inner product

1.1.2 Definition of Inner product

1.1.3 The properties of inner product

1.2.1 Definition of vector projection

2 Solve in matlab

TOPIC 2: THE ORTHOGONALITY

1 Theory

2.1.1 Introduction of orthogonality

2.1.2 Definition of orthogonal

2.1.3 The properties of orthorgonal

2.2.1 Intoduction of Gram-Schmitd process 2.2.2 Definition of Gram-Schmitd process 2.2.3 The properties of Gram-Schmitd process

2 Solve in matlab

TOPIC 3: INVERSE OF A MATRIX

1 Theory

2.1.1 Introduction

2.1.2 Definition of the inverse of a matrix 2.1.3 The properties of the inverse of a matrix

2 Solve in matlab

REFERENCES

Trang 3

INTRODUCTION

This report is a list of 3 problems that have been designed to understand linear algebra in combination with Matlab programs that are customarily designed

to solve the problems

Linear algebra is a mathematical concept connected to linear equations, linear functions and their representations through matrices and vector spaces It is essential for the definition of basic objects in modern geometry presentations, which are used in most fields of engineering and science

MATLAB is a programming platform designed specifically for engineers and scientists The heart of MATLAB is the MATLAB language, a matrix script that allows the most natural expression of computational mathematics Using MATLAB, users can analyze data, develop algorithms or even create models

Trang 4

PROBLEM

Problem 1: Write a program to find the reflection of an polygonal object in R3

with the inner product is given by

< x, y >= 4x1y1 + 3x2y2 − x2y3 − x3y2+ x3y3

about a given plane ax + by + cz = d

Problem 2: Write a program to input any number of vector in R n and return the orthogonal basis and orthonormal basis of the subspace spanned by these vectors (Use Gram - Schmidt process)

Problem 3: Write a program to find the inverse of a given matrix

Trang 5

TOPIC 1: INNER PRODUCT

1 Theory

1.1.1 Introduction of inner product

In mathematics, an inner product space or a Hausdorff pre-Hilbert space is

a vector space with a binary operation called an inner product This operation asociates each pair of vectors in the space with a scalar quantity know as the inner product of the vector, often deoted using angle brackets Inner product allow the rigorous introduction of intuitive geometrical notions, such as the length of a vector or the angle between 2 vectors They also provide the means of defining orthogonality between vectors( zero inner product) Inner product space generalize Eculidean spaces (in which the inner product is the dot product, also known as the scalar product) to vector spaces of any( possibly infinite) dimension, and are studied in functional analysis Inner product spaces over the field of complex numbers are sometimes referred to as unitary spaces

A vector operation that allows us to define length and angle for vectors in

an arbitrary vector space This operation is called the <inner product between two vectors=, and is a generalization of the dot product that was introduced in the Matrices lecture

1.1.2 Definition inner product

An inner product on a real vector space V is a function that associates a real number u, v with each pair of vectors in V in such a way that the following axioms are satisfied for all vectors u, v, and w in V and all scalars k

1 (u,v) = (v,u) [ Symmetry axiom ]

2 (u + v, ) = (u, + v,w w w) [ Additivity axiom ]

3 ( u,v) = (u,v) k k [ Homogeneity axiom ]

4 (v,v) g 0 and (v,v) = 0 if and only if v = 0 [ Positivity axiom ]

Trang 6

1.1.3 The properties of inner product

A real vector space V is called a real Euclidean inner product space if

8 9·,· :V V × →R

(x, y) −→ 8x y9− which is called , inner product of 2 vectors

The following 4 axioms are satisfied

1.8x y9=8y x9, ∀x y V , , , ∈

2.8x + y, z9 = 8x, z9 + y, 9, ∀x y8 z , , z ∈ V

3.8αx y9= α8x y9 ∀x y ∈V ∀α∈R , , , , ,

4.8x, x9 > 0, x ≠ 0 and 8x x9, = 0 = 0 ⇔ x

*Remarkable: dot product is standard inner product n

(x,y)→<x y> = ∑, �㕛ÿ=1 ý�㕖þ�㕖 =x y T

where x =(x1,x2, ,xn), y =(y1,y2, ,yn)

1.2.1 Definition vector projection

Let U be a subspace of an inner product space V Any vector z in U can be uniquely represented as z=x+y, x U, y∈ ∈U⊥

1 X is called the vector projection/ vector resolution of z onto U Denote : prU(z)

2 Y is called the vector projection of z

3 The distance from z to U : d (z , U ) = y = z ∥ ∥ ∥ − prU (z ) ∥

Trang 7

1.3.1 Introduction of linear transformation

A linear transformation is a function from one vector space to another that respects the underlying (linear) structure of each vector space A linear transformation is also known as a linear operator or map The range of the transformation may be the same as the domain, and when that happens, the transformation is known as an endomorphism or, if invertible, an automorphism The two vector spaces must have the same underlying field

Linear transformations are useful because they preserve the structure of a vector space So, many qualitative assessments of a vector space that is the domain

of a linear transformation may, under certain conditions, automatically hold in the image of the linear transformation For instance, the structure immediately gives that the kerneland image are both subspaces (not just subsets) of the range of the linear transformation

1.3.2 Definition inner product

Let U,V be 2 vector spaces over the field K(R,C) f : U → V is called a linear transformation if:

1 ∀ 1 2 ∈u ,u U,f(u +u1 2)=f(u1)+f(u2)

2 ∀u ∈ U, α ∈ K : f (αu) = αf (u)

Let f : U → V be a linear transformation Let E = {e1, e , , e } and F = {f , f , 2 n 1 2 ., f } be bases of U and V , respectively.An m × n matrix whose the i -th column m

is the coordinate vector of f (e ) with respect to the basis F is called the i

transformation matrix of f with respect to E,F Denote:

1 A EF = [f(e1 F )] [f(e )]2 F [f(en F)]

2 [f(x)] =AF EF[x]

Trang 8

1.3.3 The properties of matrix transformation

- If f: Rn → m : [ f (e ) ] = F R i F −1[f(ei)], then:

AEF =[� 㔹− 1[Ā(ÿ1)] �㔹− 1[Ā(ÿ2)] �㔹−1

[Ā(ÿ�㕛)]]= F−1f(E)

- If f : Rm → Rn, E,F are two corresponding bases Then:

AEF =F−1.f(E)

- If f : Rn → n R , E is a basis of R Then : n

A =EE −1.f(E)

2 Solve in matlab

Problem : Write a program to find the reflection of an polygonal object in R3

with the inner product is given by

< x, y >= 4x1y1 + 3x2y2 − x y2 3 − x3 2 y + x3y3

about a given plane ax + by + cz = d

Trang 9

Explain:

1: Clear command promt

2: Clear all value on workspace

12: Print on the screen

18: Solve the problem

20 => 21: Disp the result

Ex 1: Plan (P): x - 2y + 5z = 4

Answer the question:

Ex 2: Plan (P): 9x + 2y - z = -3

Answer the question:

Trang 10

Ex 3: Plan (P): -3x + y - 7z = 6

Answer the question:

Trang 11

TOPIC 2 : THE ORTHOGONALITY

1 Theory

2.1.1 Introduction

Orthogonality can help us sove the problem of checking whether the angle between vectos is �㔋

2 Accordingly, we make the following definition which is applicable even if one or both of the vectorss is zero

2.1.2 Definition orthogonal

A vector u is called orthogonal to a vector space U if it is orthogonal to any vector v in U: (u,v) = 0, v U If U = span{M}, then u U u M, (u ∀ ∈ ⊥ ⇔ ⊥ ⊥

U u to the spanning set of U) ⇔ ⊥

Two vector subspaces, A and B, of an inner product space V, are called orthogonal subspaces if each vector in A is orthogonal to each vector in B The largest subspace of V that is orthogonal to a given subspace is its orthogonal complement

Given a module M and its dual M∗, an element m′ of M∗ and an element

m of M are orthogonal if their natural pairing is zero, i.e ïm′, mð = 0 Two sets S′

⊆ M∗ and S ⊆ M are orthogonal if each element of S′ is orthogonal to each element of S

A set of vectors in an inner product space is called pairwise orthogonal if each pairing of them is orthogonal Such a set is called an orthogonal set

2.1.3 The properties of the orthogonal of a matrix

In an inner product space V, a basis E={e1 2,e , ,en} is called an

orthogonal basis for V , if it is mutually orthogonal (ei ⊥ j ∀ e i , j )

In an inner product space V, a basis E={e1 2,e , ,en} is called an

orthonormal basis for V, if it is orthogonal (ei ⊥ j e ), and ∥ei∥ = 1, i,j ∀

Trang 12

2.2.1 Introduction of Gram-Schmidt process

The Gram Schmidt process gives the way to orthonormalize a set of – vectors in an inner product space, most commonly the Euclidean space Rn equipped with the standard inner product The Gram Schmidt process takes a – finite, linearly independent set of vectors S = {v1, …, vk} for k f n and generates

an orthogonal set S′ = {u1, …, uk} that spans the same k-dimensional subspace of

Rn as S

The application of the Gram Schmidt process to the column vectors of a – full column rank matrix yields the QR decomposition

2.2.2 Definition Gram-Schmidt process

The projection operator is defined by:

proju(v) = +u,v,

+ u,u ,

where +u, v, denotes the inner product of the vectors u and v This operator projects the vector v orthogonally onto the line spanned by vector u

The Gram Schmidt process then allows: –

uk = V - k ∑ā21Ā=1proj (uvk) e = k uk

ǁ ǁ uk 2.2.3 The properties of the orthogonal of a matrix

In an inner product space V, E = {e1,e , ,e2 n} is a basis of V We will find an orthogonal basis F from E using Gram-Schmidt algorithm:

1 f1 = e1

2 f2=e −2 prf (e )=e2 2−(ÿ2,Ā1)(Ā1,Ā1) f1

3 f3=e −pr (e ) pr3 f 3− f (e )=e3 3− (ÿ3,Ā1)

(Ā1,Ā1) f1− (ÿ3,Ā2)

(Ā2,Ā2) f2

4 fn = en − prf1 (en − pr) f2 n) − prfn−1 (en) (e

Trang 13

2 Solve in matlab

Problem : Write a program to input any number of vector in R n and return the orthogonal basis and orthonormal basis of the subspace spanned by these vectors (Use Gram - Schmidt process)

Trang 14

Explain:the codes have one biggest con that is it is unable to generate a set of orthogonal or orthonormal vectors if the matrix has LD vectors Therefore, the user has to choose a matrix that its rank equals to the number of vectors

Choosing a matrix that its rank equals to the number of vectors

1=>15: Create a square matrix

16=>41: Apply Gram-Schmidt process’s formula

42=>46: Normalized the result

The following are examples of applying the codes to a square matrix, a

general matrix and a matrix that has linearly dependent vectors

Ex 1(Square matrix) : 3 vectors (1, 3, 5), (7, 9, 11), (13, 17, 19)

Answer the question :

Ex 2(General matrix) : 2 vector (1,3,5) and vector (7,9,1)

Answer the question:

Trang 15

Ex 3: The linearly dependent vector (1,2,3) and vector(3,4,6)

Answer the question : Your Matrix must be Linearly Independent

Trang 16

TOPIC 3: INVERSE OF A MATRIX

1 Theory

3.1.1 Introduction

In real arithmetic every nonzero number a has a reciprocal A (= 1/A) with −1

the property A.A = A A= 1 −1 −1

The number A is sometimes called the multiplicative inverse of A Our next −1

objective is to develop an analog of this result for matrix arithmetic For this purpose

we make the following definition

3.1.2 Definition the inverse of a matrix

If A is a square matrix ( n x n ), and if a matrix B of the same size can be found such that BA = AB = I , then A is said to be invertible (or non-singular) and B n

is called an inverse of A and is denoted by A If no such matrix B can be found, -1

then A is said to be singular

3.1.3 The properties of the inverse of a matrix

The relationship AB = BA = I is not changed by interchanging A and B, so n

if A is invertible and B is an inverse of A, then it is also true that B is invertible, and

A is an inverse of B Thus, when AB = BA = I we say that A and B are inverses of n

one another

If A is an n × n matrix, then the following statements are equivalent:

1 A is invertible

2 A Elementary Row Operations In

3 r(A) = n

Inversion Algorithm:

(A|I) Elementary Row Operations (I|A ) E-1 n.E E En-1 2 1.A = I

⇒ A = E-1

n.E E E n-1 2 1

Trang 17

Suppose that A,B are 2 invertible matrices of order n We have :

1 The inverse if exist is unique

2 (ý )21 21 = A

3 (ý�㕇)21 = (ý21)�㕇

4 AB is invertible and (ýþ)21 = þ21 ý21

2 Solve in matlab

Problem : Write a program to find the inverse of a given matrix

Explain:

1=>7: Create a square matrix

8=>9: If matrix cannot inverse => Print < not invertable < on the screen

10=>11: Solve output matrix

12=>13: Print all values on the screen

Trang 18

Example 1: Find the invertable matrix of A=(

1 2 3

4 5 6

2 5 7 )

Answer the question

ý21=

(

5

3

1

3 −1

216

3

1

3 2

10

3

21

3 −1

) Example 2: Find the invertable matrix of A=(

1 2 3

4 5 6

2 4 6 )

Answer the question

Matrix A not invertable

Trang 19

Example 3: Find the invertable matrix of A=(

2 3 1 5

6 3 1 2

1 8 2 1

1 3 6 8 )

Answer the question

ý21=(

−0.0578 0.1952 −0.0491 −0.0065

0.0665 −0.036 0.132 −0.0491

−0.3653 0.0829 0.0294 0.2039

0.2563 −0.0731 −0.0654 −0.0087

)

Trang 20

REFERENCES

1 <INNER PRODUCT= https://users.math.msu.edu/users/gnagy/teaching/05-fall/Math20F/w9-F.pdf

2 <INNER PRODUCT SPACE=

https://en.wikipedia.org/wiki/Inner_product_space

3 <ORTHOGONALITY=

https://en.wikipedia.org/wiki/Orthogonality#Definitions

4 Book Elementary < Linear Algebra= – Howard Anton Chris Rorres

5 <Gram-Schmitd Process=https://en.wikipedia.org/wiki/Gram–

Schmidt_process#Properties

6 <LINEAR TRANSFORMATION= https://brilliant.org/wiki/linear-transformations/

7 Teaching slide of lecture Phan Thị Khánh Vân

8 Teaching slide of lecture Hoàng Hải Hà

Ngày đăng: 10/02/2025, 15:58

w