Linear Algebra review (optional) - Jun Jijun.hansung.ac.kr/ML/docs-slides-Lecture3-kr.pdf ·...

Post on 08-Jul-2020

7 views 0 download

Transcript of Linear Algebra review (optional) - Jun Jijun.hansung.ac.kr/ML/docs-slides-Lecture3-kr.pdf ·...

Andrew Ng

Linear Algebra review (optional)

Matrices and vectors

Machine Learning

Andrew Ng

행렬의차원: 행의수 x 열의수

Matrix: Rectangular array of numbers:

Andrew Ng

Matrix Elements (entries of matrix)

“ , entry” in the row, column.

Andrew Ng

Vector: An n x 1 matrix.

1-indexed vs 0-indexed:element

Andrew Ng

Linear Algebra review (optional)

Addition and scalar multiplication

Machine Learning

Andrew Ng

Matrix Addition

Andrew Ng

Scalar Multiplication

Andrew Ng

Combination of Operands

Andrew Ng

Linear Algebra review (optional)

Matrix-vector multiplication

Machine Learning

Andrew Ng

Example

Andrew Ng

Details:

m x n matrix(m rows,

n columns)

n x 1 matrix(n-dimensional

vector)

m-dimensional vector

To get , multiply ’s row with elements of vector , and add them up.

Andrew Ng

Example

Andrew Ng

House sizes:

Andrew Ng

Linear Algebra review (optional)

Matrix-matrix multiplication

Machine Learning

Andrew Ng

Example

Andrew Ng

Details:

m x n matrix(m rows,

n columns)

n x o matrix(n rows,

o columns)

m x omatrix

The column of the matrix is obtained by multiplyingwith the column of . (for = 1,2,…,o)

Andrew Ng

Example

2 7

7

Andrew Ng

House sizes:

Matrix Matrix

Have 3 competing hypotheses:

1.

2.

3.

Andrew Ng

Linear Algebra review (optional)

Matrix multiplication properties

Machine Learning

Andrew Ng

Let and be matrices. Then in general,

(not commutative.)

E.g.

Andrew Ng

Let

Let

Compute

Compute

Andrew Ng

Identity Matrix

For any matrix ,

Denoted (or ).Examples of identity matrices:

2 x 23 x 3

4 x 4

Andrew Ng

Linear Algebra review (optional)

Inverse and transpose

Machine Learning

Andrew Ng

모든수가역수를가지지는않는다.

Matrix inverse:If A is an m x m matrix, and if it has an inverse,

역이없는행렬을 “singular” 또는 “degenerate” 라한다.

Andrew Ng

Matrix Transpose

Example:

Let be an m x n matrix, and let Then is an n x m matrix, and