














































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!















































Definition of Vectors
A vector is an ordered collection of 𝑛 (length/dimension) real numbers, typically represented as a column
vector.
A vector in ℝ
2
can be visualized as an arrow from the origin ( 0 , 0 ) to the point (𝑣
1
2
Equality of vectors
Two vectors are equal if and only if all their corresponding components are equal.
i=
i
Vector addition → Vectors are added component-wise. 𝐬 = 𝐯 + 𝐰 ⇒ 𝑠
𝑖
𝑖
𝑖
applies also to subtraction.
𝑛
is the set of all real-valued vectors with 𝑛 components.
parallelogram they form when placed tail-to-tail.
Vector subtraction
Geometrically , u − v = u +(−v) : flip v and then use the parallelogram rule.
Scalar multiplication → Multiply each component of the vector by the scalar.
flips (c < 0 ) a vector.
1
2
𝑛
Dot Product (Orthogonal product) → The sum of the products of corresponding entries.
𝑖
𝑖
𝑛
𝑖= 1
𝐮 ⋅ 𝐯 =∥ 𝐮 ∥∥ 𝐯 ∥ cos 𝜃
vectors point in the same direction.
Norm: ∥ 𝐯 ∥= √
1
2
𝑛
2
is the length of the vector.
How Norms of 𝒘 and 𝒖 Are Related
We want to show:
If 𝒘 = 𝒄 ⋅ 𝒖 , then ∥ 𝒘 ∥=∣ 𝒄 ∣⋅∥ 𝒖 ∥
Step-by-step:
1
2
2
2
𝑛
2
𝑖
𝑖
1
2
2
2
𝑛
2
2
1
2
2
2
2
2
𝑛
2
2
2
1
2
2
2
𝑛
2
2
1
2
2
2
𝑛
2
o √𝑐
2
=∣ 𝑐 ∣ (absolute value of 𝑐)
o √𝑢
1
2
2
2
𝑛
2
=∥ 𝑢 ∥ (norm of 𝑢)
Unit vector → has a length of 1. Any vector can be normalized (scaled to unit length) by dividing by its
𝒗
∥𝒗∥
Orthogonality
Projection via Dot Product
Dot product → measures how much one vector extends in the direction of another.
o Scalar Projection: 𝐮 ⋅ 𝐯̂ (the length of the projection).
o Vector Projection: proj
𝐯̂
Orthogonal projection and Decomposition
𝐯 = proj
𝐮
⏟
component parallel to 𝐮
𝐮
⏟
component orthogonal to 𝐮
residual vector is orthogonal to 𝐮:
𝐮 ⋅ (𝐯 − proj
𝐮
Linear Combinations
A vector 𝐮 is a linear combination of vectors 𝐯 1
𝑘
if it can
be written as 𝐮 = 𝑐 1
1
𝑘
𝑘
for some scalars 𝑐
1
𝑘
Linear Independence
A set of vectors is linearly independent if no vector in the set can be written as a linear combination of the
others. Otherwise, they are linearly dependent.
1
𝑘
} are linearly independent if the only solution
to 𝑐
1
1
𝑘
𝑘
= 0 is 𝑐
1
𝑘
The rank → is the maximum number of linearly independent vectors in the set.
2
, two vectors are independent if they are not collinear (angle ≠ 0° or 180°). → non sono
sulla stessa retta.
Triangular Matrix
That is, 𝒂
𝒊𝒋
= 𝟎 for all 𝒊 > 𝒋. 𝐴 = [
That is, 𝒂
𝒊𝒋
= 𝟎 for all 𝒊 > 𝒋. 𝐴 = [
𝑖𝑗
= 0 for
all 𝑖 ≠ 𝑗.
11
22
𝑛𝑛
11
22
𝑛𝑛
Theorem:
If 𝐴 is a square matrix, then if :
𝑇
is upper triangular
𝑇
is lower triangular
Proof:
Let 𝐴 be an 𝑛 × 𝑛 matrix.
(1) Hypothesis →Suppose 𝐴 is lower triangular : 𝒂 𝒊𝒋
= 𝟎 for all 𝒊 > 𝒋
Thesis → 𝐴
𝑇
is upper triangular: 𝑨
𝑻
𝒊𝒋
= 𝟎 for all 𝒊 > 𝒋.
The transpose satisfies: (𝐴
𝑇
𝑖𝑗
𝑗𝑖
If 𝑖 > 𝑗, then 𝑗 < 𝑖, so 𝑎
𝑗𝑖
𝑇
𝑖𝑗
= 0 for all 𝑖 > 𝑗.
Hence, 𝐴
𝑇
is upper triangular.
(2) Hypothesis →Suppose 𝐴 is upper triangular : 𝒂
𝒊𝒋
= 𝟎 for all 𝒊 < 𝒋
Thesis → 𝐴
𝑇
is lower triangular: (𝑨
𝑻
𝒊𝒋
= 𝟎 for all 𝒊 < 𝒋.
The transpose satisfies: (𝐴
𝑇
𝑖𝑗
𝑗𝑖
If 𝑖 < 𝑗, then 𝑗 > 𝑖, so 𝑎
𝑗𝑖
𝑇
𝑖𝑗
= 0 for all 𝑖 < 𝑗.
Hence, 𝐴
𝑇
is lower triangular.
zero matrix → is a matrix in which every entry is equal to zero.
A square diagonal matrix is called an identity matrix if all the elements on the main diagonal are 1. It is
denoted by 𝐼. Example for 𝑛 = 3 : 𝐼 = [
The columns of the identity matrix are the standard basis vectors. 𝑒
1
2
3
Rank
number of linearly independent column vectors (or, equivalently, row vectors) in the matrix.
rank (the dimension of the row space).
rank {𝒂
‾
𝟏
‾
𝟐
‾
𝒏
} = rank {𝒂
‾
𝟏
‾
𝟐
‾
𝒎
Basic Matrix Operations.
wise: (𝑨 + 𝑩)
𝒊𝒋
𝒊𝒋
𝒊𝒋
for 𝒊 = 𝟏, … , 𝒎; 𝒋 = 𝟏, … , 𝒏
element-wise: (𝒄𝑨)
𝒊𝒋
𝒊𝒋
for 𝒊 = 𝟏, … , 𝒎; 𝒋 = 𝟏, … , 𝒏
defined as : (𝑨 ∘ 𝑩)
𝒊𝒋
𝒊𝒋
𝒊𝒋
‾
and 𝑏
‾
in ℝ
𝑛
is 𝒂
‾
‾
𝟏
𝟏
𝟐
𝟐
𝒏
𝒏
product 𝐴𝐵 is an 𝑚 × 𝑛 matrix defined by:
𝒊𝒋
‾
𝒊
‾
𝒋
𝒊𝒎
𝒎𝒋
𝒌
𝒎=𝟏
the number of rows of 𝑩.
o If 𝑨 is 𝒎 × 𝒌 and 𝑩 is 𝒌 × 𝒏 , then 𝑨𝑩 is 𝒎 × 𝒏.
Example:
] (2x2) 𝐵 = [
] (3x2)
Geometric Meaning of 𝐀𝐱 and 𝐱
𝐭
1
2
1
2
𝑡
𝐴 as a Linear Combination of Rows of A:
𝑡
1
2
1
2
1
2
1
The transpose of this result, (𝑥
𝑡
𝑡
, is a linear combination of the column vectors of 𝐴
𝑡
Transpose of a Product and Symmetric Matrices
This is equivalent to the matrix equation:
‾
‾
,where 𝑐
‾
1
2
𝑘
‾
‾
is 𝑐
‾
‾
Condition Meaning
Rank(A)=k All k columns are linearly independent.
Rank(A)<k The columns are linearly dependent. There are non-zero solutions to Ac =
Property of 𝑨
𝒕
𝑨 → Theorem for Full-Rank Matrices.
Theorem: If 𝐴 is an 𝑛 × 𝑘 matrix with rank 𝑘, then the 𝑘 × 𝑘 matrix 𝐴
𝑡
𝐴 also has rank 𝑘 (and is therefore
invertible).
𝑡
‾
‾
, then 𝑐
‾
must be 0
‾
𝑡
‾
‾
‾
𝑡
‾
𝑡
𝑡
‾
‾
𝑡
‾
) = 0 , which means ∥ 𝐴𝑐
‾
2
‾
‾
‾
‾
is 𝑐
‾
‾
o Conclusion: The only solution to 𝐴
𝑡
‾
‾
is 𝑐
‾
‾
, so 𝐴
𝑡
𝐴 has full rank (k).
The determinant is a scalar value defined only for square matrices. It is a tool for computing the rank
and checking for invertibility.
11
12
21
22
] , det (𝐴) = 𝒂
𝟏𝟏
𝟐𝟐
𝟏𝟐
𝟐𝟏
] , det (𝐴) = ( 1 )(− 1 ) − (− 2 )( 0 ) = − 1
area of the parallelogram defined by its column vectors.
Determinant is computed by expanding along a row or column.
a 22
− a 12
a 21
𝒊+𝒋
𝒊𝒋
𝒊𝒋
𝒏
𝒋=𝟏
Exmple 𝐴 = [
Expand along row 1:
det (𝐴) = (+ 1 ) ⋅ 1 ⋅ det [
] + (− 1 ) ⋅ 4 ⋅ det [
] + (+ 1 ) ⋅ 2 ⋅ det [
Better: Expand along row 3 or column 1 because they have more zeros
Determinant of Triangular Matrices and Link to Rank.
Property: If 𝐴 is a triangular matrix (upper or lower), then the determinant of 𝐴 is the product of the
entries on its main diagonal.
𝟏𝟏
𝟐𝟐
𝟑𝟑
𝒏𝒏
o Example: For an upper triangular matrix:
11
12
13
22
23
33
, det (𝐴) = 𝑎
11
22
33
Theorem Link to Rank: If 𝐝𝐞𝐭 (𝑨) ≠ 𝟎 for an 𝑛 × 𝑛 matrix 𝐴, then the matrix has full rank (i.e., rank(𝐴) =
𝑛). Such a matrix is called invertible or non-singular.
Inverse Matrix Definition
𝑛
− 1
, the inverse of 𝐴.
➔ Questo significa che AA
- 1
−𝟏
exists if 𝐝𝐞𝐭 (𝑨) ≠ 𝟎 , i.e., when 𝐴 has rank 𝑛 (full rank).
If A and B are invertible square matrices nxn: (AB)
- 1
- 1
- 1
Proof.
To show that 𝐵
− 1
− 1
is the inverse of 𝐴𝐵, it suffices to verify the defining properties of the inverse:
That is, multiplying 𝐴𝐵 by 𝐵
− 1
− 1
on both the left and the right must yield the identity matrix 𝐼
𝑛
− 1
− 1
𝑛
− 1
− 1
𝑛
Step 1.
We compute: (𝐴𝐵)(𝐵
− 1
− 1
− 1
− 1
𝑛
− 1
− 1
𝑛
Step 2.
We compute: (𝐵
− 1
− 1
− 1
− 1
− 1
𝑛
− 1
𝑛
Since both conditions are satisfied, we conclude that 𝐴𝐵 is invertible and (𝐴𝐵)
− 1
− 1
− 1
Role of the Identity Matrix
1×1 Case:
Proof:
We must prove that 𝐴𝐴
− 1
= 𝐼, i.e.:
− 1
𝑖𝑖
= 1 (diagonal entries)
− 1
𝑖𝑗
= 0 for 𝑖 ≠ 𝑗 (off-diagonal entries)
Step 1. The diagonal entries (𝒊 = 𝒋)
We compute: (𝐴𝐴
− 1
𝑖𝑖
𝑖𝑘
− 1
𝑘𝑖
𝑛
𝑘= 1
Now substitute the formula for (𝐴
− 1
𝑘𝑖
− 1
𝑘𝑖
(− 1 )
𝑘+𝑖
det (𝐴
𝑖𝑘
)
det (𝐴)
So: (𝐴𝐴
− 1
𝑖𝑖
1
det (𝐴)
𝑖+𝑘
𝑖𝑘
det (𝐴
𝑖𝑘
𝑛
𝑘= 1
This sum is exactly the Laplace expansion of det (𝐴)along row 𝑖: det (𝐴) = ∑ (− 1 )
𝑖+𝑘
𝑖𝑘
det (𝐴
𝑖𝑘
𝑛
𝑘= 1
Hence (𝐴𝐴
− 1
𝑖𝑖
det (𝐴)
det (𝐴)
So all diagonal entries are 1.
Step 2. The off-diagonal entries (𝒊 ≠ 𝒋)
We now compute: (𝐴𝐴
− 1
𝑖𝑗
𝑖𝑘
− 1
𝑘𝑗
𝑛
𝑘= 1
Substitute again: (𝐴
− 1
𝑘𝑗
(− 1 )
𝑗+𝑘
det (𝐴
𝑗𝑘
)
det (𝐴)
So: (𝐴𝐴
− 1
𝑖𝑗
1
det (𝐴)
𝑗+𝑘
𝑖𝑘
det (𝐴
𝑗𝑘
𝑛
𝑘= 1
Now, notice something important:
This sum looks like the Laplace expansion of a determinant , but not of 𝐴.
It’s the determinant of a modified matrix where row 𝑗has been replaced by row 𝑖.
That matrix has two identical rows (rows 𝑖and 𝑗),
and the determinant of any matrix with two identical rows is zero.
Hence: (𝐴𝐴
− 1
𝑖𝑗
So all off-diagonal entries are 0.
Final conclusion
Putting both results together: (𝐴𝐴
− 1
𝑖𝑗
1 if 𝑖 = 𝑗,
0 if 𝑖 ≠ 𝑗
− 1
Example: 𝐴 = [
Step 1: Compute det (𝐴)
det (𝐴) = ( 2 )( 3 ) − ( 1 )( 1 ) = 6 − 1 = 5 (≠ 0 ⇒ invertible)
Step 2: Apply the formula
− 1
𝑖𝑗
𝑖+𝑗
det (𝐴
𝑗𝑖
det (𝐴)
11
= remove row 1, col 1 → [ 3 ]
det (𝐴
11
− 1
11
1 + 1
21
= remove row 2, col 1 → [ 1 ]
det (𝐴
21
− 1
12
1 + 2
12
= remove row 1, col 2 → [ 1 ]
det (𝐴
12
− 1
21
2 + 1
22
= remove row 2, col 2 → [ 2 ]
det (𝐴
22
− 1
22
2 + 2
Step 3: Write the inverse matrix
− 1
Verification: 𝐴𝐴
− 1
3
5
1
5
1
5
2
5
6 − 1
5
− 2 + 2
5
3 − 3
5
− 1 + 6
5
Eigenvalues and Eigenvectors
Let 𝐴 be an 𝑛 × 𝑛 square matrix.
𝑛
is called an eigenvector of 𝐴 if there exists a scalar 𝜆 such that:
𝐴𝐯 = 𝜆𝐯 , v≠
Eigenvectors Are Not Unique
eigenvector with the same eigenvalue 𝜆.
Proof: 𝐴(𝑐𝐯) = 𝑐(𝐴𝐯) = 𝑐(𝜆𝐯) = 𝜆(𝑐𝐯)
So 𝐴𝐰 = 𝜆𝐰.
3. Solve the system step-by-step: - From (3): − 6 𝑣
3
3
2
2
2
= 0 and 𝑣
3
1
is free (it does not appear in any equation).
4. General solution and eigenvector:
1
2
3
1
1
1
The eigenvectors for 𝜆 = 3 are all non-zero scalar multiples of [
Eigenvector for 𝝀 = 𝟐
Solve (𝐴 − 2 𝐼)𝐯 = 𝟎: 𝐴 − 2 𝐼 = [
System: {
1
2
3
3
1
2
3
Eigenvector: 𝐯 = 𝑐 [
Eigenvector for 𝝀 = −𝟑
Solve (𝐴 + 3 𝐼)𝐯 = 𝟎: 𝐴 + 3 𝐼 = [
System: {
1
2
2
3
2
1
3
5
2
2
1
Eigenvector: 𝐯 = 𝑐 [
Property: If 𝜆
1
2
are distinct eigenvalues of 𝐴 with corresponding eigenvectors 𝐯
1
2
then 𝐯
1
and 𝐯
2
are linearly independent → the set of eigenvectors has full rank n.
1
2
} is 2
Spectral Theorem: If 𝐴 is a nxn symmetric matrix (𝐴 = 𝐴
𝑇
), then:
𝑻
where:
1
𝑛
1
2
𝑛
Orthogonal Matrices: Definition and Key Property
A square matrix 𝑉 is called an orthogonal matrix if its columns form an orthonormal set of vectors. This
means:
𝑖
𝑖
= 1 or ∥ 𝐯
𝑖
𝑖
𝑗
= 𝟎 for 𝑖 ≠ 𝑗
We can write such a matrix as:
1
2
3
𝑛
Consequences of Orthonormal Columns:
The Key Property: 𝑽
−𝟏
𝑻
The most important property of an orthogonal matrix is that its inverse is equal to its transpose :
−𝟏
𝑻
Proof that 𝑽
𝑻
To prove 𝑉
− 1
𝑇
, we show that 𝑉
𝑇
Step 1: Write the matrix product
𝑇
1
𝑇
2
𝑇
𝑛
𝑇
1
2
𝑛
]
Step 2: Understand what each entry represents
𝑇
𝑖𝑗
𝑖
𝑇
𝑗
𝑖
𝑗
This is the dot product of column vector 𝑖 and column vector 𝑗.
Step 3: Apply the orthonormal conditions
𝑖
𝑖
𝑇
𝑖𝑖
𝑖
𝑗
𝑇
𝑖𝑗
Step 4: Final result
Therefore, the product is the identity matrix:
𝑇
Since 𝑉
𝑇
𝑉 = 𝐼, by definition, 𝑉
𝑇
is the inverse of 𝑉:
− 1
𝑇
Part 1: Finding the Eigenvalues (λ)
Given the symmetric matrix A:
Step 2: Solve the system (𝐴 − 𝜆 2
1
2
1
2
From equation (1): 𝑣
2
1 −√ 5
2
1
Let 𝑣 1
= 1 , then 𝑣
2
1 −√ 5
2
Eigenvector: 𝐯 𝟐
𝟏−√𝟓
𝟐
Part 3: Orthogonality Check
Verify the eigenvectors are orthogonal:
1
2
The eigenvectors are orthogonal.
Part 4: Normalization (Creating Orthonormal Eigenvectors)
Normalize 𝐯 1
and 𝐯
2
to unit length.
Normalize 𝐯 𝟏
1
2
2
1
1
1
Normalize 𝐯 𝟐
2
2
2
2
2
2
Part 5: Orthogonal Diagonalization (Spectral Theorem)
The Spectral Theorem states that for a symmetric matrix 𝐴, we can write:
𝑇
where 𝐷 is the diagonal matrix of eigenvalues and 𝑉 is the orthogonal matrix of normalized eigenvectors.
Diagonal matrix D:
1
2
Orthogonal matrix V:
Since 𝑉 is orthogonal, 𝑉
− 1
𝑇
Verification of 𝑽
𝑻
The columns of 𝑉 are 𝐮 1
and 𝐮
2
, which are orthonormal:
1
1
2
2
1
2
Therefore:
𝑇
1
1
1
2
2
1
2
2
Quadratic form and matrices which are definite in sign
Given a symmetric square matrix 𝐴, a quadratic form associated with 𝐴 is the following real function:
𝑇
Where 𝐱 = [
1
2
𝑛
and 𝑓 is a function depending on 𝑛 variables 𝑥
1
2
𝑛
Example for 𝑛 = 2 :
Let 𝐱 = [
and 𝐴 = [
11
12
12
22
11
12
12
22
11
12
12
22
11
12
12
22
11
12
12
22
11
2
12
12
22
2
𝟏𝟏
𝟐
𝟏𝟐
𝟐𝟐
𝟐
Compute the derivatives:
11
12
12
22
The gradient of 𝑓, ∇𝑓, is the vector of partial derivatives:
11
12
12
22
11
12
12
22
In the general case, we can write the quadratic form as:
𝑇
𝑛
𝑖= 1
𝑖𝑗
𝑖
𝑗
𝑛
𝑗= 1
𝑖𝑖
𝑖
2
𝑛
𝑖= 1
𝑛− 1
𝑖= 1
𝑖𝑗
𝑖
𝑗
𝑛
𝑗=𝑖+ 1
Let 𝑨 be an 𝒏 × 𝒏 symmetric matrix.
The gradient is given by:
∇𝑓 = 2 𝐴x
Because 𝑉 is orthogonal, 𝑉
𝑇
− 1
. This means:
Now, what is 𝐱
𝑇
If 𝐲 = 𝑉
𝑇
𝐱, then taking the transpose:
𝑻
𝑻
𝑻
𝑻
T
T
𝑻
So we can substitute:
𝑇
𝑇
𝑇
𝑇
𝑇
1
2
𝑛
1
2
𝑛
1
2
𝑛
1
1
2
2
2
2
𝑛
𝑛
2
𝑇
𝑖
𝑖
2
𝑛
𝑖= 1
1
1
2
2
2
2
𝑛
𝑛
2
a) If 𝐴 is positive definite, the hypothesis is:
𝑇
𝐴𝐱 > 0 if 𝐱 ≠ 𝟎
The statement "for any 𝐱" means for any 𝐲 = 𝑉
𝑇
Since 𝑉 is orthogonal:
𝑇
− 1
𝑇
− 1
In order to guarantee that 𝐱
𝑇
𝐴𝐱 > 0 if 𝐱 ≠ 𝟎, you need that:
1
2
𝑛
If the eigenvalues are positive, we have that:
𝑖
𝑖
2
𝑛
𝑖= 1
which is 𝐱
𝑇
𝐴𝐱 > 0 positive for all 𝐲 ≠ 𝟎.
Why are these matrices relevant?
Consider the one-dimensional case where we approximate a function 𝑓 with its second-degree Taylor
polynomial around a point 𝑥 0
0
′
0
0
′′
0
0
2
0
′
0
) = 0 , so:
0
′′
0
0
2
o If 𝑓
′′
0
) > 0 : The term
𝑓
′′
(𝑥 0
)
2
0
2
is always positive (for 𝑥 ≠ 𝑥
0
), so 𝑓(𝑥) >
0
) → local minimum.
o If 𝑓
′′
0
) < 0 : The term is always negative → 𝑓(𝑥) < 𝑓(𝑥
0
) → local maximum.
Remark: To check if a point is a min or max, you look at the second derivative , 𝑓
′′
′′
(𝑥) > 0 → Minimum (curve up)
′′
(𝑥) < 0 → Maximum (curve down)
In multivariable calculus, the Taylor expansion takes the following form:
0
0
𝑇
0
0
𝑇
𝑓
0
0
𝑓
0
) is the Hessian matrix of 𝑓 at 𝐱
0
, which is the matrix of second-order partial
derivatives.
0
The Taylor expansion simplifies to: 𝑓(𝐱) ≈ 𝑓(𝐱
0
1
2
0
𝑇
𝑓
0
0
1
2
0
𝑇
𝑓
0
0
). The definiteness of
the Hessian matrix tells us :
Constrained Optimization
We want to optimize a function 𝑓 subject to one or more equality constraints.
General form (one constraint): max / min 𝑓(𝑥) s.t. 𝑔(𝑥) = 𝑐
Two-variable extension: max / min 𝑓(𝑥, 𝑦) s.t. 𝑔(𝑥, 𝑦) = 𝑐
Lagrangian:
) or ℒ(𝑥, 𝑦, 𝜆) = 𝑓(𝑥, 𝑦) + 𝜆(𝑐 − 𝑔(𝑥, 𝑦))
We have an optimization problem with constants: min 𝑓
subject to 𝑔(𝑥) = 𝑐
We can rewrite the constraint as: 0 = 𝑐 − 𝑔(𝑥)
therefore we have: min 𝑓(𝑥) subject to 𝑐 − 𝑔(𝑥) = 0
We want to solve this problem as an unconstrained optimization problem by introducing the so-called
Lagrangian method.
We define the Lagrangian function as follows: 𝓛(𝒙, 𝝀) = 𝒇(𝒙) + 𝝀(𝒄 − 𝒈(𝒙))
Remark: ℒ(𝑥, 𝜆) = 𝑓(𝑥) when 𝑔(𝑥) = 𝑐
The main advantage of this approach is that we can solve the problem by setting the derivatives equal
to zero and solving for the stationary points.
′
′
′
′
We look for stationary points that are the solution of the system of equations :
′
′
′
′
Note that the first order optimality conditions are:
a) There is a linear dependence between the two directions (slope)
b) The constraint must be satisfied