Docsity

Quantitative methods for finance, Dispense di Matematica Applicata

Toggle sidebar
bg1
LINEAR ALGEBRA
MATRICES AND VECTORS
A matrix may be defined as a rectangular array of numbers (real or complex): when the array A has m
rows and n columns and the entries are real numbers, we say that A is an m × n matrix, or more formally
A ∈ R m×n. T
The elements of A are denoted as aij , where i denotes the row and j the column:
𝐴=
$
𝑎11
𝑎21
𝑎𝑚1)𝑎12
𝑎22
𝑎𝑚2𝑎1𝑛
𝑎2𝑛
𝑎𝑚𝑛
+
If m=1, A is a row vector; if n=1, A is a column vector.
Sometimes a m x n matric is expressed as A=(aij)m x n
Example 1
You may think of a m × n matrix A as a portion of a spreadsheet containing in each cell (the entry aij )
a number: suppose for example to have m = 3 industries producing n = 4 products and let aij be the
monthly number of items put on the market.
We may organize this information into a 3 × 4 matrix:
𝐴=
$
1000
1530
1345)))246
432
563)))2380
2140
1990)))1760
1820
2110
+
We have e.g. a32 = 563, a14 = 1760...
Example 2
Let us consider a system of linear equations:
4
3𝑥!−𝑥"+
√
2𝑥#=2
0.2𝑥!+2𝑥"−5.6𝑥#=0
• Row= number of equations
Here the coefficients of the system may be organized into a 2 × 3 matrix and a 2 × 1 vector:
)𝐴=)
:
3 −1
√
2
0.2 2 −5.6
; ,
)))𝑏
=
>
=
?
2
0
@
Also the unkowns may be represented as the vector
))𝑥
>
=
$
𝑥1
𝑥2
𝑥3
+
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58

Anteprima parziale del testo

Scarica Quantitative methods for finance e più Dispense in PDF di Matematica Applicata solo su Docsity!

LINEAR ALGEBRA

MATRICES AND VECTORS

A matrix may be defined as a rectangular array of numbers (real or complex): when the array A has m

rows and n columns and the entries are real numbers, we say that A is an m × n matrix, or more formally

A ∈ R

m×n

. T

The elements of A are denoted as a ij

, where i denotes the row and j the column:

If m=1, A is a row vector ; if n=1, A is a column vector.

Sometimes a m x n matric is expressed as A=(a ij

m x n

Example

You may think of a m × n matrix A as a portion of a spreadsheet containing in each cell (the entry a ij

a number: suppose for example to have m = 3 industries producing n = 4 products and let a ij

be the

monthly number of items put on the market.

We may organize this information into a 3 × 4 matrix:

We have e.g. a 32

= 563, a 14

Example 2

Let us consider a system of linear equations:

!

"

!

"

  • Row= number of equations

Here the coefficients of the system may be organized into a 2 × 3 matrix and a 2 × 1 vector:

Also the unkowns may be represented as the vector 𝑥⃗ = $

MATRIX OPERATIONS

In general, if A = (a ij

)m×n and B = (b ij

m×n

are two matrices of the same dimension, we define the sum

of A and B as the matrix obtained by adding their corresponding entries:

𝐴 + 𝐵 = (𝑎𝑖𝑗)𝑚 × 𝑛 + (𝑏𝑖𝑗)𝑚 × 𝑛 ≔ (𝑎𝑖𝑗 + 𝑏𝑖𝑗)𝑚 × 𝑛

Of course the same is true for the subtraction.

Example 3

If α ∈ R, we define the multiplication by a scalar αA as:

𝑚 × 𝑛

Example 4

  • The dimenion does not change

Let A, B and C matrices with dimension m × n.

Rules for matrix addition and multiplication by scalars

• (A + B ) + C = A + (B + C )

  • A+B=B+A ® doesn’t work for multiplication
  • A+0=A ® the dimension ( same number of rows and same number of columns ) of 0 needs to

be the same of A

  • (α + β)A = αA + βA ® distributive property

REMARK 1

The matrix multiplication is NOT commutative: in general AB ¹ BA.

Example 6 (System of equations in matrix form

Let us consider the system

M

!

"

!

"

!

"

N

It can be written as 𝐴𝑥 = 𝑏

Where

THE IDENTITY MATRIX

The identity matrix of order n, denoted with I n

, is the matrix whose entries are: 𝐼

'

For any n x n matrix A 𝐴𝐼𝑛 = 𝐼𝑛𝐴 = 𝐴.

THE TRANSPOSE MATRIX

Let A be a m × n matrix, A = (a ij

m×n

. The transpose of A, denoted by A′ (or At ) is defined as

A′ = (a ji

n×m

, that is the rows of A become the columns of A′:

!!

!"

!'

"!

""

"'

)!

)"

)'

!!

"!

)!

!"

""

)"

!'

"'

)'

Example 7

Rules for matrix transposition

• (A′)′ = A

• (A + B )′ = A′ + B ′

  • (αA)′ = αA′

• (AB )′ = B ′A′

The n × n matrix A is said symmetric if and only if A = A′, that is a ij

= a ji

for all i , j = 1, 2,... , n.

Example 8 (Symmetric matrices)

R

S

VECTORS

A matrix for which m = 1 or n = 1 is called a column or row vector, respectivley: so

  • (𝑎 = (𝑎 1 , 𝑎 2 ,... , 𝑎𝑛) Þ row vector
  • Þ column vector

The number a i

i s called the i - th component (or coordinate) of the vector.

Of course row and column vectors contain the same ‘’information”, but the dimension 1 × n or n × 1 is

important for matrix operations and coding. Geometrically, a vector of real numbers represents a point

in the n- dimensional space Rn.

OPERATIONS ON VECTORS

Since n-vectors are matrices with a dimension fixed to 1, all the algebraic operations defined for

matrices are equally valid for n-vectors, provided the right dimensions:

  • sum and difference: a + b, a − b
  • multiplication by a scalar α: αa
  • product:

o if a is 1 × n and b = n × 1, then ab is 1 × 1 (a scalar).

o If a is n × 1 and b = 1 × n, then ab is n × n (a matrix).

Example 13

THE INNER PRODUCT

The inner (or scalar) product of two n-vectors a and b is defined as

!

!

"

"

'

'

= J 𝑎

$

$

'

$(!

Rules for the inner product

  • a·b=b·a Þ commutative
  • a · (b + c) = a · b + a · c Þ distributive
  • (αa) · b = a · (αb) = α(a · b)

𝒊

𝟐

𝒏

𝒊(𝟏

o Square of a diagonal Þ pitagora theorem

DETERMINANTS

Given a square matrix A = (a ij

n×n

, we introduce the determinant of A, denoted as |A| or det(A).

  • The det can be computed only for square matrix
  • A number associated with a matrix gives information about the matrix itself

SARRUS METHOD

The formal definition of the determinant of a square matrix requires the notion of permutation (or

shuffling) of 1, 2,... , n. Recall that n! = n · (n − 1) · (n − 2) · · · 2 · 1 is the the number of all such

permutations.

The determinant of A is the sum of n! terms each being a product of n elements of the matrix, one

element for each row and one for each column, of the type 𝒂𝟏 𝒑𝟏

𝒑𝟐

𝒑𝒏

, where p1,p2, pn

is a permutation of 1, 2, n.

Numerical methods are usually considered tha computation of the determinant.

Rules for determinants

Let A be a n × n matrix.

  • if all the entries in a column or in a row are 0, then |A| = 0

• |A′| = |A|

  • if all the elements of a row (or column) are multiplied by a scalar α, the determinant is α|A|
  • if two rows or columns are interchanged, the determinant changes sign
  • if two rows (or columns) are proportional (e.g. equal), then |A| = 0

• |AB| = |A||B|

  • if α ∈ R, then |αA| = αn|A|
  • if A is triangular then

$$

'

$(!

The rank ρ(A) of a matrix A is the maximum number of rows or columns which are linearly

independent.

Rules for the calculus of the rank.

  • ρ(A) is an integer number
  • ρ(A) ≥ 0; in particular ρ(A) = 0 if and only if A = 0 (the zero-matrix)
  • ρ(A) ≤ min{m, n}, that is the rank is at most equal to the minimum between the number of rows

and columns

For a square matrix A of order n it is possible to prove that ρ(A) = n ⇔ |A| = 0

SYSTEMS OF LINEAR EQUATIONS

Let us consider a system of linear equations m × n

i

!!

!

!"

"

!'

'

!

"!

!

""

"

"'

'

"

)!

!

)"

"

)'

'

)

Let us define the matrix of coefficients A = (a ij

m×n

and the (columns) vectors b = (b j

m×

1 and x = (x i

)n×1:

!!

!"

!'

"!

""

"'

)!

)"

)'

!

"

)

!

"

'

We represent the linear system (1) in matrix notation as 𝐴𝑥 = 𝑏 ( 2 )

The system is therefore characterized by m equations in n unknowns. A solution of (1) or (2) is a vector

y satisfying simultaneously all the equations , i.e. Ay = b. It can be seen that such a system may have

no solutions, one solution, ... , infinite solutions, depending on the matrix A and the vector b. The

following Theorem gives a condition for which the system admits solutions and characterizes their

‘’number”.

Let us firstly define the augmented matrix [A|b]:

[𝐴|𝑏] = $

!!

!"

!'

!

"!

""

"'

"

)!

)"

)'

)

THEOREM 16 (ROUCHÉ – CAPELLI)

The system 𝑨𝒙 = 𝒃 admits solutions (or it is consistent) if and only if 𝝆(𝑨) = 𝝆(𝑨|𝒃) Þ rank

A= rank augmented A.

Moreover, if the system is consistent, the number of solutions is ∞

𝒏 0 𝝆(𝑨)

What is the meaning of having ∞

𝒏 0 𝝆(𝑨)

solutions?

  • if ρ(A) = n, then the solution is unique
  • if ρ(A) = n − 1, then the system has ∞1 solutions. That is, the system has an infinity of solutions

spanning a stright line

  • if ρ(A) = n − 2, then the system has ∞2 solutions. That is, the system has an infinity of solutions

spanning a plane

Collary 17 (consequence of theorem)

Let A = (aij )n×n and b = (bj )n×1.

The (square) linear system Ax = b has a unique solution if and only if |A| = 0 Þ rank = n.

Remark 2 (geometrical interpretation)

A matrix A = (a ij

m×n

may be seen as a map transforming R

n

vectors in R

m

vectors:

The matrix A represents a linear transformation from Rn to Rm.

THEOREM 19 (SOLUTIONS OF HOMOGENEOUS SYSTEM)

Let A = (a ij

n×n

, then the homogeneous linear system with n equations and n unknowns Ax = 0 has non-

trivial solutions if and only if |A| = 0 (that is A is singular).

CONTOUR LINES

A contour line or level curve is a curve along which the function has a constant value. Level curves are used

to give a geometrical representation of a function f. Indeed, the surface representing 𝑧 = 𝑓 (𝑥, 𝑦 ) can be cut by

the horizontal plane 𝑧 = 𝑐. The projection on the xy - plane of the resulting intersection is the level curve of f at

height c. Mathematically, a contour line is the solution of f (𝑥 , 𝑦 ) = 𝑐.

Example 2

QUADRATIC FORMS

Given any real number a, b, c , a quadratic form is a homogeneous polynomial of degree 2 (x is degree 1 and y

iss degree 2):

𝑓(𝑥, 𝑦) = 𝑎𝑥

!

  • 𝑏𝑦

!

  • 2 𝑐𝑥𝑦

In a matrix form:

𝑓(𝑥, 𝑦) = (

𝑥 𝑦 ) 6

𝑎 𝑐

𝑐 𝑏

7 6

𝑥

𝑦

7

Note that Q is a symmetric matrix. We will see later in this course that the variance of a portfolio is a quadratic

form in the vector of percentages invested in the assets.

  • Example
  • Example
  • Example
  • Example

EIGENVALUES AND EIGENVECTORS

Given a matrix (square matrix) A = (aij )n×n, we say that v ¹ 0 is an eigenvector for A if there exists a scalar λ

such that

𝐴𝑣 = 𝜆𝑣

In such a case λ is said the eigenvalue associated to v.

  • Matrix x v Þ linear trasformation of v
  • V x number
  • Particular direction which invariant by the application of A
  • Direction of the vector is the same

Remark 1 (geometric interpretation)

The direction in ℝ

"

represented by an eigenvector v is preserved by the linear transformation A and scaled by the

quantity λ.

Example 1

Reflection through the bisector of the first-third quadrant.

𝐴 = 6

0 1

1 0

7 In this case, the eigenvectors are given by 𝑣

= 6

1

1

7 , 𝑣

!

=

6

1

− 1

7

Example 2

90◦-Rotation (anti-clockwise). Þ no special direction that remains the

same

𝐴 = 6

0 − 1

1 0

7 Þ In this case, the eigenvectors DO NOT EXIST! No

directions are unchanges through rotations.

Given a square matrix 𝐴 ∈ ℝ

" % "

, if it has n independent eigenvectors v1,... , vn, relative to the n eigenvalues

λ1,... λn, it is possible to prove that 𝑨 = 𝑽𝑫𝑽

&𝟏

, where D is a diagonal matrix.

𝐷 = A

𝜆 1 0 … 0

0 𝜆 2 … 0

0 0 𝜆𝑛

D

V is the matrix whose columns are the eigenvectors of A

𝑉 = A

𝑣

𝑣

#!

𝑣

#"

𝑣

!#

𝑣

!!

𝑣

!"

𝑣

"#

𝑣

"!

𝑣

""

D

Why it is important?