SlideShare a Scribd company logo
1 of 40
LINEAR ALGEBRA
(WITH OPTIMIZATION)
CHARAK RAY
LIBRA.CHARAK@GMAIL.COM
OUTLINE
• Basic definitions
• Subspaces and Dimensionality
• Matrix functions: inverses and eigenvalue decompositions
• Convex optimization
VECTORS AND MATRICES
• Vector 𝑥 ∈ ℝ 𝑑
𝑥 =
𝑥1
𝑥2
⋮
𝑥 𝑑
• May also write
𝑥 = 𝑥1 𝑥2 … 𝑥 𝑑
𝑇
VECTORS AND MATRICES
• Matrix 𝑀 ∈ ℝ 𝑚×𝑛
𝑀 =
𝑀11 ⋯ 𝑀1𝑛
⋮ ⋱ ⋮
𝑀 𝑚1 ⋯ 𝑀 𝑚𝑛
• Written in terms of rows or columns
𝑀 =
𝒓1
𝑇
⋮
𝒓 𝑚
𝑇
= 𝒄1 … 𝒄 𝑛
𝒓𝑖 = 𝑀𝑖1 … 𝑀𝑖𝑛
𝑇 𝒄𝑖 = 𝑀1𝑖 … 𝑀 𝑚𝑖
𝑇
MULTIPLICATION
• Vector-vector: 𝑥, 𝑦 ∈ ℝ 𝑑
→ ℝ
𝑥 𝑇
𝑦 =
𝑖=1
𝑑
𝑥𝑖 𝑦𝑖
• Matrix-vector: 𝑥 ∈ ℝ 𝑛
, 𝑀 ∈ ℝ 𝑚×𝑛
→ ℝ 𝑚
𝑀𝑥 =
𝒓1
𝑇
⋮
𝒓 𝑚
𝑇
𝑥 =
𝒓1
𝑇
𝑥
⋮
𝒓 𝑚
𝑇
𝑥
MULTIPLICATION
• Matrix-matrix: 𝐴 ∈ ℝ 𝑚×𝑘
, 𝐵 ∈ ℝ 𝑘×𝑛
→ ℝ 𝑚×𝑛
=5
3
3
4 4
5
MULTIPLICATION
• Matrix-matrix: 𝐴 ∈ ℝ 𝑚×𝑘
, 𝐵 ∈ ℝ 𝑘×𝑛
→ ℝ 𝑚×𝑛
• 𝒂𝑖 rows of 𝐴, 𝒃𝑗 cols of 𝐵
𝐴𝐵 = 𝐴 𝒃1 … 𝐴𝒃 𝑛 =
𝒂1
𝑇
𝐵
⋮
𝒂 𝑚
𝑇 𝐵
=
𝒂1
𝑇
𝒃1 ⋯ 𝒂1
𝑇
𝒃 𝑛
⋮ 𝒂𝑖
𝑇
𝒃𝑗 ⋮
𝒂 𝑚
𝑇 𝒃1 ⋯ 𝒂 𝑚
𝑇 𝒃 𝑛
MULTIPLICATION PROPERTIES
• Associative
𝐴𝐵 𝐶 = 𝐴 𝐵𝐶
• Distributive
𝐴 𝐵 + 𝐶 = 𝐴𝐵 + 𝐵𝐶
• NOT commutative
𝐴𝐵 ≠ 𝐵𝐴
• Dimensions may not even be conformable
USEFUL MATRICES
• Identity matrix 𝐼 ∈ ℝ 𝑚×𝑚
• 𝐴𝐼 = 𝐴, 𝐼𝐴 = 𝐴
1 0 0
0 1 0
0 0 1
𝐼𝑖𝑗 =
0 𝑖 ≠ 𝑗
1 𝑖 = 𝑗
• Diagonal matrix 𝐴 ∈ ℝ 𝑚×𝑚
𝐴 = diag 𝑎1, … , 𝑎 𝑚 =
𝑎1 ⋯ 0
⋮ 𝑎𝑖 ⋮
0 ⋯ 𝑎 𝑚
USEFUL MATRICES
• Symmetric 𝐴 ∈ ℝ 𝑚×𝑚: 𝐴 = 𝐴 𝑇
• Orthogonal 𝑈 ∈ ℝ 𝑚×𝑚:
𝑈 𝑇
𝑈 = 𝑈𝑈 𝑇
= 𝐼
• Columns/ rows are orthonormal
• Positive semidefinite 𝐴 ∈ ℝ 𝑚×𝑚
:
𝑥 𝑇 𝐴𝑥 ≥ 0 for all 𝑥 ∈ ℝ 𝑚
• Equivalently, there exists 𝐿 ∈ ℝ 𝑚×𝑚
𝐴 = 𝐿𝐿 𝑇
OUTLINE
• Basic definitions
• Subspaces and Dimensionality
• Matrix functions: inverses and eigenvalue decompositions
• Convex optimization
NORMS
• Quantify “size” of a vector
• Given 𝑥 ∈ ℝ 𝑛, a norm satisfies
1. 𝑐𝑥 = 𝑐 𝑥
2. 𝑥 = 0 ⇔ 𝑥 = 0
3. 𝑥 + 𝑦 ≤ 𝑥 + 𝑦
• Common norms:
1. Euclidean 𝐿2-norm: 𝑥 2 = 𝑥1
2
+ ⋯ + 𝑥 𝑛
2
2. 𝐿1-norm: 𝑥 1 = 𝑥1 + ⋯ + 𝑥 𝑛
3. 𝐿∞-norm: 𝑥 ∞ = max
𝑖
𝑥𝑖
LINEAR SUBSPACES
LINEAR SUBSPACES
• Subspace 𝒱 ⊂ ℝ 𝑛 satisfies
1. 0 ∈ 𝒱
2. If 𝑥, 𝑦 ∈ 𝒱 and 𝑐 ∈ ℝ, then 𝑐 𝑥 + 𝑦 ∈ 𝒱
• Vectors 𝒙1, … , 𝒙 𝑚 span 𝒱 if
𝒱 = 𝑖=1
𝑚
𝛼𝑖 𝒙𝑖 𝛼 ∈ ℝ 𝑚
LINEAR INDEPENDENCE AND DIMENSION
• Vectors 𝒙1, … , 𝒙 𝑚 are linearly independent if
𝑖=1
𝑚
𝛼𝑖 𝒙𝑖 = 0 ⟺ 𝛼 = 0
• Every linear combination of the 𝒙𝑖 is unique
• Dim 𝒱 = 𝑚 if 𝒙1, … , 𝒙 𝑚 span 𝒱 and are linearly independent
• If 𝒚1, … , 𝒚 𝑘 span 𝒱 then
• 𝑘 ≥ 𝑚
• If 𝑘 > 𝑚 then 𝒚𝑖 are NOT linearly independent
LINEAR INDEPENDENCE AND DIMENSION
MATRIX SUBSPACES
• Matrix 𝑀 ∈ ℝ 𝑚×𝑛
defines two subspaces
• Column space col 𝑀 = 𝑀𝛼 𝛼 ∈ ℝ 𝑛
⊂ ℝ 𝑚
• Row space row 𝑀 = 𝑀 𝑇
𝛽 𝛽 ∈ ℝ 𝑚
⊂ ℝ 𝑛
• Nullspace of 𝑀: null 𝑀 = 𝑥 ∈ ℝ 𝑛
𝑀𝑥 = 0
• null 𝑀 ⊥ row 𝑀
• dim null 𝑀 + dim row 𝑀 = 𝑛
• Analog for column space
MATRIX RANK
• rank 𝑀 gives dimensionality of row and column spaces
• If 𝑀 ∈ ℝ 𝑚×𝑛 has rank 𝑘, can decompose into product of 𝑚 × 𝑘 and 𝑘 × 𝑛
matrices
𝑀
rank = 𝑘
=𝑚
𝑛
𝑚
𝑛
𝑘
𝑘
PROPERTIES OF RANK
• For 𝐴, 𝐵 ∈ ℝ 𝑚×𝑛
1. rank 𝐴 ≤ min 𝑚, 𝑛
2. rank 𝐴 = rank 𝐴 𝑇
3. rank 𝐴𝐵 ≤ min rank 𝐴 , rank 𝐵
4. rank 𝐴 + 𝐵 ≤ rank 𝐴 + rank 𝐵
• 𝐴 has full rank if rank 𝐴 = min 𝑚, 𝑛
• If 𝑚 > rank 𝐴 rows not linearly independent
• Same for columns if 𝑛 > rank 𝐴
OUTLINE
• Basic definitions
• Subspaces and Dimensionality
• Matrix functions: inverses and eigenvalue decompositions
• Convex optimization
MATRIX INVERSE
• 𝑀 ∈ ℝ 𝑚×𝑚
is invertible iff rank 𝑀 = 𝑚
• Inverse is unique and satisfies
1. 𝑀−1
𝑀 = 𝑀𝑀−1
= 𝐼
2. 𝑀−1 −1
= 𝑀
3. 𝑀 𝑇 −1
= 𝑀−1 𝑇
4. If 𝐴 is invertible then 𝑀𝐴 is invertible and 𝑀𝐴 −1
= 𝐴−1
𝑀−1
SYSTEMS OF EQUATIONS
• Given 𝑀 ∈ ℝ 𝑚×𝑛, 𝑦 ∈ ℝ 𝑚 wish to solve
𝑀𝑥 = 𝑦
• Exists only if 𝑦 ∈ col 𝑀
• Possibly infinite number of solutions
• If 𝑀 is invertible then 𝑥 = 𝑀−1
𝑦
• Notational device, do not actually invert matrices
• Computationally, use solving routines like Gaussian elimination
SYSTEMS OF EQUATIONS
• What if 𝑦 ∉ col 𝑀 ?
• Find 𝑥 that gives 𝑦 = 𝑀𝑥 closest to 𝑦
• 𝑦 is projection of 𝑦 onto col 𝑀
• Also known as regression
• Assume rank 𝑀 = 𝑛 < 𝑚
𝑥 = 𝑀 𝑇
𝑀 −1
𝑀 𝑇
𝑦 𝑦 = 𝑀 𝑀 𝑇
𝑀 −1
𝑀 𝑇
𝑦
Invertible Projection
matrix
SYSTEMS OF EQUATIONS
1 0
2 1
.5
−2.5
=
.5
−1.5
−1 1
1 1
−1
−.5
=
.5
−1.5
EIGENVALUE DECOMPOSITION
• Eigenvalue decomposition of symmetric 𝑀 ∈ ℝ 𝑚×𝑚
is
𝑀 = 𝑄Σ𝑄 𝑇 =
𝑖=1
𝑚
𝜆𝑖 𝒒𝑖 𝒒𝑖
𝑇
• Σ = diag 𝜆1, … , 𝜆 𝑛 contains eigenvalues of 𝑀
• 𝑄 is orthogonal and contains eigenvectors 𝒒𝑖 of 𝑀
• If 𝑀 is not symmetric but diagonalizable
𝑀 = 𝑄Σ𝑄−1
• Σ is diagonal by possibly complex
• 𝑄 not necessarily orthogonal
CHARACTERIZATIONS OF EIGENVALUES
• Traditional formulation
𝑀𝑥 = 𝜆𝑥
• Leads to characteristic polynomial
det 𝑀 − 𝜆𝐼 = 0
• Rayleigh quotient (symmetric 𝑀)
max
𝑥
𝑥 𝑇
𝑀𝑥
𝑥 2
2
EIGENVALUE PROPERTIES
• For 𝑀 ∈ ℝ 𝑚×𝑚
with eigenvalues 𝜆𝑖
1. tr 𝑀 = 𝑖=1
𝑚
𝜆𝑖
2. det 𝑀 = 𝜆1 𝜆2 … 𝜆 𝑚
3. rank 𝑀 = #𝜆𝑖 ≠ 0
• When 𝑀 is symmetric
• Eigenvalue decomposition is singular value decomposition
• Eigenvectors for nonzero eigenvalues give orthogonal basis for row 𝑀 =
col 𝑀
SIMPLE EIGENVALUE PROOF
• Why det 𝑀 − 𝜆𝐼 = 0?
• Assume 𝑀 is symmetric and full rank
1. 𝑀 = 𝑄Σ𝑄 𝑇
2. 𝑀 − 𝜆𝐼 = 𝑄Σ𝑄 𝑇 − 𝜆𝐼 = 𝑄 Σ − 𝜆𝐼 𝑄 𝑇
3. If 𝜆 = 𝜆𝑖, 𝑖th eigenvalue of 𝑀 − 𝜆𝐼 is 0
4. Since det 𝑀 − 𝜆𝐼 is product of eigenvalues, one of the terms is 0, so
product is 0
𝑄𝑄 𝑇 = 𝐼
OUTLINE
• Basic definitions
• Subspaces and Dimensionality
• Matrix functions: inverses and eigenvalue decompositions
• Convex optimization
CONVEX OPTIMIZATION
• Find minimum of a function subject to solution constraints
• Business/economics/ game theory
• Resource allocation
• Optimal planning and strategies
• Statistics and Machine Learning
• All forms of regression and classification
• Unsupervised learning
• Control theory
• Keeping planes in the air!
CONVEX SETS
• A set 𝐶 is convex if ∀𝑥, 𝑦 ∈ 𝐶 and ∀𝛼 ∈ 0,1
𝛼𝑥 + 1 − 𝛼 𝑦 ∈ 𝐶
• Line segment between points in 𝐶 also lies in 𝐶
• Ex
• Intersection of halfspaces
• 𝐿 𝑝 balls
• Intersection of convex sets
CONVEX FUNCTIONS
• A real-valued function 𝑓 is convex if dom𝑓 is convex and ∀𝑥, 𝑦 ∈ dom𝑓 and
∀𝛼 ∈ 0,1
𝑓 𝛼𝑥 + 1 − 𝛼 𝑦 ≤ 𝛼𝑓 𝑥 + 1 − 𝛼 𝑓 𝑦
• Graph of 𝑓 upper bounded by line segment between points on graph
𝑥, 𝑓 𝑥
𝑦, 𝑓 𝑦
GRADIENTS
• Differentiable convex 𝑓 with dom𝑓 = ℝ 𝑑
• Gradient 𝛻𝑓 at 𝑥 gives linear approximation
𝛻𝑓 =
𝛿𝑓
𝛿𝑥1
…
𝛿𝑓
𝛿𝑥 𝑑
𝑇
𝑓
𝑥
𝑓 𝑥 + 𝑤 𝑇 𝛻𝑓
GRADIENTS
• Differentiable convex 𝑓 with dom𝑓 = ℝ 𝑑
• Gradient 𝛻𝑓 at 𝑥 gives linear approximation
𝛻𝑓 =
𝛿𝑓
𝛿𝑥1
…
𝛿𝑓
𝛿𝑥 𝑑
𝑇
𝑓
𝑥
𝑓 𝑥 + 𝑤 𝑇 𝛻𝑓
GRADIENT DESCENT
• To minimize 𝑓 move down gradient
• But not too far!
• Optimum when 𝛻𝑓 = 0
• Given 𝑓, learning rate 𝛼, starting point 𝑥0
𝑥 = 𝑥0
Do until 𝛻𝑓 = 0
𝑥 = 𝑥 − 𝛼𝛻𝑓
STOCHASTIC GRADIENT DESCENT
• Many learning problems have extra structure
𝑓 𝜃 =
𝑖=1
𝑛
𝐿 𝜃; 𝒙𝑖
• Computing gradient requires iterating over all points, can be too costly
• Instead, compute gradient at single training example
STOCHASTIC GRADIENT DESCENT
• Given 𝑓 𝜃 = 𝑖=1
𝑛
𝐿 𝜃; 𝒙𝑖 , learning rate 𝛼, starting point 𝜃0
𝜃 = 𝜃0
Do until 𝑓 𝜃 nearly optimal
For 𝑖 = 1 to 𝑛 in random order
𝜃 = 𝜃 − 𝛼𝛻𝐿 𝜃; 𝒙𝑖
• Finds nearly optimal 𝜃
MINIMIZE 𝑖=1
𝑛
𝑦𝑖 − 𝜃 𝑇
𝒙𝑖
2
LEARNING PARAMETER
THANK YOU…

More Related Content

What's hot

Matrices and their applications
Matrices and their applicationsMatrices and their applications
Matrices and their applicationsZarghaam Abbas
 
Matrices
MatricesMatrices
MatricesNORAIMA
 
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSRai University
 
character table in vibrational spectroscopy
character table in vibrational spectroscopycharacter table in vibrational spectroscopy
character table in vibrational spectroscopysourabh muktibodh
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Stability a...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Stability a...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Stability a...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Stability a...AIMST University
 
Presentation of Data
Presentation of DataPresentation of Data
Presentation of DataSuresh Babu
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Root Locus ...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Root Locus ...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Root Locus ...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Root Locus ...AIMST University
 
Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Rai University
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Fundamental...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Fundamental...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Fundamental...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Fundamental...AIMST University
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - System Models
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - System ModelsLecture Notes:  EEEC4340318 Instrumentation and Control Systems - System Models
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - System ModelsAIMST University
 
Qausi Conformal Curvature Tensor on 푳푪푺 풏-Manifolds
Qausi Conformal Curvature Tensor on 푳푪푺 풏-ManifoldsQausi Conformal Curvature Tensor on 푳푪푺 풏-Manifolds
Qausi Conformal Curvature Tensor on 푳푪푺 풏-Manifoldsinventionjournals
 
Parallel tansportsqrdaa
Parallel tansportsqrdaaParallel tansportsqrdaa
Parallel tansportsqrdaafoxtrot jp R
 

What's hot (20)

ppt of VCLA
ppt of VCLAppt of VCLA
ppt of VCLA
 
Matrices and their applications
Matrices and their applicationsMatrices and their applications
Matrices and their applications
 
Matrices
MatricesMatrices
Matrices
 
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
 
The derivatives module03
The derivatives module03The derivatives module03
The derivatives module03
 
Nmsa 170900713008
Nmsa 170900713008Nmsa 170900713008
Nmsa 170900713008
 
character table in vibrational spectroscopy
character table in vibrational spectroscopycharacter table in vibrational spectroscopy
character table in vibrational spectroscopy
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Stability a...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Stability a...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Stability a...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Stability a...
 
Presentation of Data
Presentation of DataPresentation of Data
Presentation of Data
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Root Locus ...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Root Locus ...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Root Locus ...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Root Locus ...
 
Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -Bba i-bm-u-2- matrix -
Bba i-bm-u-2- matrix -
 
Gauss method
Gauss methodGauss method
Gauss method
 
Course pack unit 5
Course pack unit 5Course pack unit 5
Course pack unit 5
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Fundamental...
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Fundamental...Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - Fundamental...
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - Fundamental...
 
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - System Models
Lecture Notes:  EEEC4340318 Instrumentation and Control Systems - System ModelsLecture Notes:  EEEC4340318 Instrumentation and Control Systems - System Models
Lecture Notes: EEEC4340318 Instrumentation and Control Systems - System Models
 
Calculus I basic concepts
Calculus I basic conceptsCalculus I basic concepts
Calculus I basic concepts
 
Qausi Conformal Curvature Tensor on 푳푪푺 풏-Manifolds
Qausi Conformal Curvature Tensor on 푳푪푺 풏-ManifoldsQausi Conformal Curvature Tensor on 푳푪푺 풏-Manifolds
Qausi Conformal Curvature Tensor on 푳푪푺 풏-Manifolds
 
Gcse Maths Resources
Gcse Maths ResourcesGcse Maths Resources
Gcse Maths Resources
 
Parallel tansportsqrdaa
Parallel tansportsqrdaaParallel tansportsqrdaa
Parallel tansportsqrdaa
 
Matrix
MatrixMatrix
Matrix
 

Similar to LINEAR ALGEBRA, WITH OPTIMIZATION

Optimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methodsOptimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methodsSantiagoGarridoBulln
 
Lecture_9_LA_Review.pptx
Lecture_9_LA_Review.pptxLecture_9_LA_Review.pptx
Lecture_9_LA_Review.pptxSunny432360
 
Linear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorialLinear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorialJia-Bin Huang
 
Module 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdfModule 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdfPrathamPatel560716
 
Graphic Notes on Introduction to Linear Algebra
Graphic Notes on Introduction to Linear AlgebraGraphic Notes on Introduction to Linear Algebra
Graphic Notes on Introduction to Linear AlgebraKenji Hiranabe
 
Coursera 2week
Coursera  2weekCoursera  2week
Coursera 2weekcsl9496
 
Calculus Review Session Brian Prest Duke University Nicholas School of the En...
Calculus Review Session Brian Prest Duke University Nicholas School of the En...Calculus Review Session Brian Prest Duke University Nicholas School of the En...
Calculus Review Session Brian Prest Duke University Nicholas School of the En...rofiho9697
 
10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptxshyedshahriar
 
Paper study: Learning to solve circuit sat
Paper study: Learning to solve circuit satPaper study: Learning to solve circuit sat
Paper study: Learning to solve circuit satChenYiHuang5
 
Tavas and pashmaks
Tavas and pashmaksTavas and pashmaks
Tavas and pashmaksminsu kim
 
Page rank - from theory to application
Page rank - from theory to applicationPage rank - from theory to application
Page rank - from theory to applicationGAYO3
 
08-Regression.pptx
08-Regression.pptx08-Regression.pptx
08-Regression.pptxShree Shree
 
Lecture_3_Gradient_Descent.pptx
Lecture_3_Gradient_Descent.pptxLecture_3_Gradient_Descent.pptx
Lecture_3_Gradient_Descent.pptxgnans Kgnanshek
 
مدخل إلى تعلم الآلة
مدخل إلى تعلم الآلةمدخل إلى تعلم الآلة
مدخل إلى تعلم الآلةFares Al-Qunaieer
 
Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章Tsuyoshi Sakama
 

Similar to LINEAR ALGEBRA, WITH OPTIMIZATION (20)

Optimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methodsOptimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methods
 
Lecture_9_LA_Review.pptx
Lecture_9_LA_Review.pptxLecture_9_LA_Review.pptx
Lecture_9_LA_Review.pptx
 
Linear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorialLinear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorial
 
Matrix algebra
Matrix algebraMatrix algebra
Matrix algebra
 
Lecture_10_SVD.pptx
Lecture_10_SVD.pptxLecture_10_SVD.pptx
Lecture_10_SVD.pptx
 
Module 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdfModule 1 Theory of Matrices.pdf
Module 1 Theory of Matrices.pdf
 
COORDINATE SYSTEM.pdf
COORDINATE SYSTEM.pdfCOORDINATE SYSTEM.pdf
COORDINATE SYSTEM.pdf
 
COORDINATE SYSTEM.pdf
COORDINATE SYSTEM.pdfCOORDINATE SYSTEM.pdf
COORDINATE SYSTEM.pdf
 
Graphic Notes on Introduction to Linear Algebra
Graphic Notes on Introduction to Linear AlgebraGraphic Notes on Introduction to Linear Algebra
Graphic Notes on Introduction to Linear Algebra
 
Coursera 2week
Coursera  2weekCoursera  2week
Coursera 2week
 
Calculus Review Session Brian Prest Duke University Nicholas School of the En...
Calculus Review Session Brian Prest Duke University Nicholas School of the En...Calculus Review Session Brian Prest Duke University Nicholas School of the En...
Calculus Review Session Brian Prest Duke University Nicholas School of the En...
 
10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx
 
Paper study: Learning to solve circuit sat
Paper study: Learning to solve circuit satPaper study: Learning to solve circuit sat
Paper study: Learning to solve circuit sat
 
Tavas and pashmaks
Tavas and pashmaksTavas and pashmaks
Tavas and pashmaks
 
Page rank - from theory to application
Page rank - from theory to applicationPage rank - from theory to application
Page rank - from theory to application
 
Av 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background MaterialAv 738- Adaptive Filtering - Background Material
Av 738- Adaptive Filtering - Background Material
 
08-Regression.pptx
08-Regression.pptx08-Regression.pptx
08-Regression.pptx
 
Lecture_3_Gradient_Descent.pptx
Lecture_3_Gradient_Descent.pptxLecture_3_Gradient_Descent.pptx
Lecture_3_Gradient_Descent.pptx
 
مدخل إلى تعلم الآلة
مدخل إلى تعلم الآلةمدخل إلى تعلم الآلة
مدخل إلى تعلم الآلة
 
Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章
 

More from CHARAK RAY

SENSING ENTREPRENEURIAL OPPORTUNITY.pptx
SENSING ENTREPRENEURIAL OPPORTUNITY.pptxSENSING ENTREPRENEURIAL OPPORTUNITY.pptx
SENSING ENTREPRENEURIAL OPPORTUNITY.pptxCHARAK RAY
 
BUSINESS, TRADE & COMMERCE
BUSINESS, TRADE & COMMERCEBUSINESS, TRADE & COMMERCE
BUSINESS, TRADE & COMMERCECHARAK RAY
 
INTRODUCTION TO BUSINESS MANAGEMENT
INTRODUCTION TO BUSINESS MANAGEMENTINTRODUCTION TO BUSINESS MANAGEMENT
INTRODUCTION TO BUSINESS MANAGEMENTCHARAK RAY
 
CASE STUDY.pptx
CASE STUDY.pptxCASE STUDY.pptx
CASE STUDY.pptxCHARAK RAY
 
HUMAN TRANSFORMATION.pptx
HUMAN TRANSFORMATION.pptxHUMAN TRANSFORMATION.pptx
HUMAN TRANSFORMATION.pptxCHARAK RAY
 
ENTREPRENEURSHIP.pptx
ENTREPRENEURSHIP.pptxENTREPRENEURSHIP.pptx
ENTREPRENEURSHIP.pptxCHARAK RAY
 
Research Methodology
Research MethodologyResearch Methodology
Research MethodologyCHARAK RAY
 
PROJECT REPORT ON COLD STORAGE
PROJECT REPORT ON COLD STORAGEPROJECT REPORT ON COLD STORAGE
PROJECT REPORT ON COLD STORAGECHARAK RAY
 
PROJECT FINANCE
PROJECT FINANCEPROJECT FINANCE
PROJECT FINANCECHARAK RAY
 
TRAINING OF POLLING PERSONNEL
TRAINING OF POLLING PERSONNELTRAINING OF POLLING PERSONNEL
TRAINING OF POLLING PERSONNELCHARAK RAY
 
WRITING AN ABSTRACT
WRITING AN ABSTRACTWRITING AN ABSTRACT
WRITING AN ABSTRACTCHARAK RAY
 
BUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENT
BUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENTBUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENT
BUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENTCHARAK RAY
 
BUSINESS STUDIES PROJECT ON MARKETING MANAGEMENT
BUSINESS STUDIES PROJECT ON MARKETING MANAGEMENTBUSINESS STUDIES PROJECT ON MARKETING MANAGEMENT
BUSINESS STUDIES PROJECT ON MARKETING MANAGEMENTCHARAK RAY
 
BUSINESS STUDIES PROJECT GUIDELINES
BUSINESS STUDIES PROJECT GUIDELINESBUSINESS STUDIES PROJECT GUIDELINES
BUSINESS STUDIES PROJECT GUIDELINESCHARAK RAY
 
ROYAL CLEAN SERVICES.
ROYAL CLEAN SERVICES.ROYAL CLEAN SERVICES.
ROYAL CLEAN SERVICES.CHARAK RAY
 
ROYAL MEGA ORGANIC FOOD PARK
ROYAL MEGA ORGANIC FOOD PARK ROYAL MEGA ORGANIC FOOD PARK
ROYAL MEGA ORGANIC FOOD PARK CHARAK RAY
 

More from CHARAK RAY (20)

SENSING ENTREPRENEURIAL OPPORTUNITY.pptx
SENSING ENTREPRENEURIAL OPPORTUNITY.pptxSENSING ENTREPRENEURIAL OPPORTUNITY.pptx
SENSING ENTREPRENEURIAL OPPORTUNITY.pptx
 
CH-1C.pptx
CH-1C.pptxCH-1C.pptx
CH-1C.pptx
 
CH-1B.pptx
CH-1B.pptxCH-1B.pptx
CH-1B.pptx
 
BUSINESS, TRADE & COMMERCE
BUSINESS, TRADE & COMMERCEBUSINESS, TRADE & COMMERCE
BUSINESS, TRADE & COMMERCE
 
INTRODUCTION TO BUSINESS MANAGEMENT
INTRODUCTION TO BUSINESS MANAGEMENTINTRODUCTION TO BUSINESS MANAGEMENT
INTRODUCTION TO BUSINESS MANAGEMENT
 
CASE STUDY.pptx
CASE STUDY.pptxCASE STUDY.pptx
CASE STUDY.pptx
 
HUMAN TRANSFORMATION.pptx
HUMAN TRANSFORMATION.pptxHUMAN TRANSFORMATION.pptx
HUMAN TRANSFORMATION.pptx
 
ENTREPRENEURSHIP.pptx
ENTREPRENEURSHIP.pptxENTREPRENEURSHIP.pptx
ENTREPRENEURSHIP.pptx
 
Research Methodology
Research MethodologyResearch Methodology
Research Methodology
 
MS WORD
MS WORDMS WORD
MS WORD
 
PROJECT REPORT ON COLD STORAGE
PROJECT REPORT ON COLD STORAGEPROJECT REPORT ON COLD STORAGE
PROJECT REPORT ON COLD STORAGE
 
PROJECT FINANCE
PROJECT FINANCEPROJECT FINANCE
PROJECT FINANCE
 
DATA ANALYSIS
DATA ANALYSISDATA ANALYSIS
DATA ANALYSIS
 
TRAINING OF POLLING PERSONNEL
TRAINING OF POLLING PERSONNELTRAINING OF POLLING PERSONNEL
TRAINING OF POLLING PERSONNEL
 
WRITING AN ABSTRACT
WRITING AN ABSTRACTWRITING AN ABSTRACT
WRITING AN ABSTRACT
 
BUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENT
BUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENTBUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENT
BUSINESS STUDIES PROJECT ON PRINCIPLES OF MANAGEMENT
 
BUSINESS STUDIES PROJECT ON MARKETING MANAGEMENT
BUSINESS STUDIES PROJECT ON MARKETING MANAGEMENTBUSINESS STUDIES PROJECT ON MARKETING MANAGEMENT
BUSINESS STUDIES PROJECT ON MARKETING MANAGEMENT
 
BUSINESS STUDIES PROJECT GUIDELINES
BUSINESS STUDIES PROJECT GUIDELINESBUSINESS STUDIES PROJECT GUIDELINES
BUSINESS STUDIES PROJECT GUIDELINES
 
ROYAL CLEAN SERVICES.
ROYAL CLEAN SERVICES.ROYAL CLEAN SERVICES.
ROYAL CLEAN SERVICES.
 
ROYAL MEGA ORGANIC FOOD PARK
ROYAL MEGA ORGANIC FOOD PARK ROYAL MEGA ORGANIC FOOD PARK
ROYAL MEGA ORGANIC FOOD PARK
 

Recently uploaded

Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max PrincetonTimothy Spann
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Cantervoginip
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Cathrine Wilhelmsen
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024Timothy Spann
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhYasamin16
 
detection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptxdetection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptxAleenaJamil4
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesTimothy Spann
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...Boston Institute of Analytics
 

Recently uploaded (20)

Real-Time AI Streaming - AI Max Princeton
Real-Time AI  Streaming - AI Max PrincetonReal-Time AI  Streaming - AI Max Princeton
Real-Time AI Streaming - AI Max Princeton
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
ASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel CanterASML's Taxonomy Adventure by Daniel Canter
ASML's Taxonomy Adventure by Daniel Canter
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)Data Factory in Microsoft Fabric (MsBIP #82)
Data Factory in Microsoft Fabric (MsBIP #82)
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
April 2024 - NLIT Cloudera Real-Time LLM Streaming 2024
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制南十字星大学毕业证(SCU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhhThiophen Mechanism khhjjjjjjjhhhhhhhhhhh
Thiophen Mechanism khhjjjjjjjhhhhhhhhhhh
 
detection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptxdetection and classification of knee osteoarthritis.pptx
detection and classification of knee osteoarthritis.pptx
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
NLP Data Science Project Presentation:Predicting Heart Disease with NLP Data ...
 

LINEAR ALGEBRA, WITH OPTIMIZATION

  • 1. LINEAR ALGEBRA (WITH OPTIMIZATION) CHARAK RAY LIBRA.CHARAK@GMAIL.COM
  • 2. OUTLINE • Basic definitions • Subspaces and Dimensionality • Matrix functions: inverses and eigenvalue decompositions • Convex optimization
  • 3. VECTORS AND MATRICES • Vector 𝑥 ∈ ℝ 𝑑 𝑥 = 𝑥1 𝑥2 ⋮ 𝑥 𝑑 • May also write 𝑥 = 𝑥1 𝑥2 … 𝑥 𝑑 𝑇
  • 4. VECTORS AND MATRICES • Matrix 𝑀 ∈ ℝ 𝑚×𝑛 𝑀 = 𝑀11 ⋯ 𝑀1𝑛 ⋮ ⋱ ⋮ 𝑀 𝑚1 ⋯ 𝑀 𝑚𝑛 • Written in terms of rows or columns 𝑀 = 𝒓1 𝑇 ⋮ 𝒓 𝑚 𝑇 = 𝒄1 … 𝒄 𝑛 𝒓𝑖 = 𝑀𝑖1 … 𝑀𝑖𝑛 𝑇 𝒄𝑖 = 𝑀1𝑖 … 𝑀 𝑚𝑖 𝑇
  • 5. MULTIPLICATION • Vector-vector: 𝑥, 𝑦 ∈ ℝ 𝑑 → ℝ 𝑥 𝑇 𝑦 = 𝑖=1 𝑑 𝑥𝑖 𝑦𝑖 • Matrix-vector: 𝑥 ∈ ℝ 𝑛 , 𝑀 ∈ ℝ 𝑚×𝑛 → ℝ 𝑚 𝑀𝑥 = 𝒓1 𝑇 ⋮ 𝒓 𝑚 𝑇 𝑥 = 𝒓1 𝑇 𝑥 ⋮ 𝒓 𝑚 𝑇 𝑥
  • 6. MULTIPLICATION • Matrix-matrix: 𝐴 ∈ ℝ 𝑚×𝑘 , 𝐵 ∈ ℝ 𝑘×𝑛 → ℝ 𝑚×𝑛 =5 3 3 4 4 5
  • 7. MULTIPLICATION • Matrix-matrix: 𝐴 ∈ ℝ 𝑚×𝑘 , 𝐵 ∈ ℝ 𝑘×𝑛 → ℝ 𝑚×𝑛 • 𝒂𝑖 rows of 𝐴, 𝒃𝑗 cols of 𝐵 𝐴𝐵 = 𝐴 𝒃1 … 𝐴𝒃 𝑛 = 𝒂1 𝑇 𝐵 ⋮ 𝒂 𝑚 𝑇 𝐵 = 𝒂1 𝑇 𝒃1 ⋯ 𝒂1 𝑇 𝒃 𝑛 ⋮ 𝒂𝑖 𝑇 𝒃𝑗 ⋮ 𝒂 𝑚 𝑇 𝒃1 ⋯ 𝒂 𝑚 𝑇 𝒃 𝑛
  • 8. MULTIPLICATION PROPERTIES • Associative 𝐴𝐵 𝐶 = 𝐴 𝐵𝐶 • Distributive 𝐴 𝐵 + 𝐶 = 𝐴𝐵 + 𝐵𝐶 • NOT commutative 𝐴𝐵 ≠ 𝐵𝐴 • Dimensions may not even be conformable
  • 9. USEFUL MATRICES • Identity matrix 𝐼 ∈ ℝ 𝑚×𝑚 • 𝐴𝐼 = 𝐴, 𝐼𝐴 = 𝐴 1 0 0 0 1 0 0 0 1 𝐼𝑖𝑗 = 0 𝑖 ≠ 𝑗 1 𝑖 = 𝑗 • Diagonal matrix 𝐴 ∈ ℝ 𝑚×𝑚 𝐴 = diag 𝑎1, … , 𝑎 𝑚 = 𝑎1 ⋯ 0 ⋮ 𝑎𝑖 ⋮ 0 ⋯ 𝑎 𝑚
  • 10. USEFUL MATRICES • Symmetric 𝐴 ∈ ℝ 𝑚×𝑚: 𝐴 = 𝐴 𝑇 • Orthogonal 𝑈 ∈ ℝ 𝑚×𝑚: 𝑈 𝑇 𝑈 = 𝑈𝑈 𝑇 = 𝐼 • Columns/ rows are orthonormal • Positive semidefinite 𝐴 ∈ ℝ 𝑚×𝑚 : 𝑥 𝑇 𝐴𝑥 ≥ 0 for all 𝑥 ∈ ℝ 𝑚 • Equivalently, there exists 𝐿 ∈ ℝ 𝑚×𝑚 𝐴 = 𝐿𝐿 𝑇
  • 11. OUTLINE • Basic definitions • Subspaces and Dimensionality • Matrix functions: inverses and eigenvalue decompositions • Convex optimization
  • 12. NORMS • Quantify “size” of a vector • Given 𝑥 ∈ ℝ 𝑛, a norm satisfies 1. 𝑐𝑥 = 𝑐 𝑥 2. 𝑥 = 0 ⇔ 𝑥 = 0 3. 𝑥 + 𝑦 ≤ 𝑥 + 𝑦 • Common norms: 1. Euclidean 𝐿2-norm: 𝑥 2 = 𝑥1 2 + ⋯ + 𝑥 𝑛 2 2. 𝐿1-norm: 𝑥 1 = 𝑥1 + ⋯ + 𝑥 𝑛 3. 𝐿∞-norm: 𝑥 ∞ = max 𝑖 𝑥𝑖
  • 14. LINEAR SUBSPACES • Subspace 𝒱 ⊂ ℝ 𝑛 satisfies 1. 0 ∈ 𝒱 2. If 𝑥, 𝑦 ∈ 𝒱 and 𝑐 ∈ ℝ, then 𝑐 𝑥 + 𝑦 ∈ 𝒱 • Vectors 𝒙1, … , 𝒙 𝑚 span 𝒱 if 𝒱 = 𝑖=1 𝑚 𝛼𝑖 𝒙𝑖 𝛼 ∈ ℝ 𝑚
  • 15. LINEAR INDEPENDENCE AND DIMENSION • Vectors 𝒙1, … , 𝒙 𝑚 are linearly independent if 𝑖=1 𝑚 𝛼𝑖 𝒙𝑖 = 0 ⟺ 𝛼 = 0 • Every linear combination of the 𝒙𝑖 is unique • Dim 𝒱 = 𝑚 if 𝒙1, … , 𝒙 𝑚 span 𝒱 and are linearly independent • If 𝒚1, … , 𝒚 𝑘 span 𝒱 then • 𝑘 ≥ 𝑚 • If 𝑘 > 𝑚 then 𝒚𝑖 are NOT linearly independent
  • 17. MATRIX SUBSPACES • Matrix 𝑀 ∈ ℝ 𝑚×𝑛 defines two subspaces • Column space col 𝑀 = 𝑀𝛼 𝛼 ∈ ℝ 𝑛 ⊂ ℝ 𝑚 • Row space row 𝑀 = 𝑀 𝑇 𝛽 𝛽 ∈ ℝ 𝑚 ⊂ ℝ 𝑛 • Nullspace of 𝑀: null 𝑀 = 𝑥 ∈ ℝ 𝑛 𝑀𝑥 = 0 • null 𝑀 ⊥ row 𝑀 • dim null 𝑀 + dim row 𝑀 = 𝑛 • Analog for column space
  • 18. MATRIX RANK • rank 𝑀 gives dimensionality of row and column spaces • If 𝑀 ∈ ℝ 𝑚×𝑛 has rank 𝑘, can decompose into product of 𝑚 × 𝑘 and 𝑘 × 𝑛 matrices 𝑀 rank = 𝑘 =𝑚 𝑛 𝑚 𝑛 𝑘 𝑘
  • 19. PROPERTIES OF RANK • For 𝐴, 𝐵 ∈ ℝ 𝑚×𝑛 1. rank 𝐴 ≤ min 𝑚, 𝑛 2. rank 𝐴 = rank 𝐴 𝑇 3. rank 𝐴𝐵 ≤ min rank 𝐴 , rank 𝐵 4. rank 𝐴 + 𝐵 ≤ rank 𝐴 + rank 𝐵 • 𝐴 has full rank if rank 𝐴 = min 𝑚, 𝑛 • If 𝑚 > rank 𝐴 rows not linearly independent • Same for columns if 𝑛 > rank 𝐴
  • 20. OUTLINE • Basic definitions • Subspaces and Dimensionality • Matrix functions: inverses and eigenvalue decompositions • Convex optimization
  • 21. MATRIX INVERSE • 𝑀 ∈ ℝ 𝑚×𝑚 is invertible iff rank 𝑀 = 𝑚 • Inverse is unique and satisfies 1. 𝑀−1 𝑀 = 𝑀𝑀−1 = 𝐼 2. 𝑀−1 −1 = 𝑀 3. 𝑀 𝑇 −1 = 𝑀−1 𝑇 4. If 𝐴 is invertible then 𝑀𝐴 is invertible and 𝑀𝐴 −1 = 𝐴−1 𝑀−1
  • 22. SYSTEMS OF EQUATIONS • Given 𝑀 ∈ ℝ 𝑚×𝑛, 𝑦 ∈ ℝ 𝑚 wish to solve 𝑀𝑥 = 𝑦 • Exists only if 𝑦 ∈ col 𝑀 • Possibly infinite number of solutions • If 𝑀 is invertible then 𝑥 = 𝑀−1 𝑦 • Notational device, do not actually invert matrices • Computationally, use solving routines like Gaussian elimination
  • 23. SYSTEMS OF EQUATIONS • What if 𝑦 ∉ col 𝑀 ? • Find 𝑥 that gives 𝑦 = 𝑀𝑥 closest to 𝑦 • 𝑦 is projection of 𝑦 onto col 𝑀 • Also known as regression • Assume rank 𝑀 = 𝑛 < 𝑚 𝑥 = 𝑀 𝑇 𝑀 −1 𝑀 𝑇 𝑦 𝑦 = 𝑀 𝑀 𝑇 𝑀 −1 𝑀 𝑇 𝑦 Invertible Projection matrix
  • 24. SYSTEMS OF EQUATIONS 1 0 2 1 .5 −2.5 = .5 −1.5 −1 1 1 1 −1 −.5 = .5 −1.5
  • 25. EIGENVALUE DECOMPOSITION • Eigenvalue decomposition of symmetric 𝑀 ∈ ℝ 𝑚×𝑚 is 𝑀 = 𝑄Σ𝑄 𝑇 = 𝑖=1 𝑚 𝜆𝑖 𝒒𝑖 𝒒𝑖 𝑇 • Σ = diag 𝜆1, … , 𝜆 𝑛 contains eigenvalues of 𝑀 • 𝑄 is orthogonal and contains eigenvectors 𝒒𝑖 of 𝑀 • If 𝑀 is not symmetric but diagonalizable 𝑀 = 𝑄Σ𝑄−1 • Σ is diagonal by possibly complex • 𝑄 not necessarily orthogonal
  • 26. CHARACTERIZATIONS OF EIGENVALUES • Traditional formulation 𝑀𝑥 = 𝜆𝑥 • Leads to characteristic polynomial det 𝑀 − 𝜆𝐼 = 0 • Rayleigh quotient (symmetric 𝑀) max 𝑥 𝑥 𝑇 𝑀𝑥 𝑥 2 2
  • 27. EIGENVALUE PROPERTIES • For 𝑀 ∈ ℝ 𝑚×𝑚 with eigenvalues 𝜆𝑖 1. tr 𝑀 = 𝑖=1 𝑚 𝜆𝑖 2. det 𝑀 = 𝜆1 𝜆2 … 𝜆 𝑚 3. rank 𝑀 = #𝜆𝑖 ≠ 0 • When 𝑀 is symmetric • Eigenvalue decomposition is singular value decomposition • Eigenvectors for nonzero eigenvalues give orthogonal basis for row 𝑀 = col 𝑀
  • 28. SIMPLE EIGENVALUE PROOF • Why det 𝑀 − 𝜆𝐼 = 0? • Assume 𝑀 is symmetric and full rank 1. 𝑀 = 𝑄Σ𝑄 𝑇 2. 𝑀 − 𝜆𝐼 = 𝑄Σ𝑄 𝑇 − 𝜆𝐼 = 𝑄 Σ − 𝜆𝐼 𝑄 𝑇 3. If 𝜆 = 𝜆𝑖, 𝑖th eigenvalue of 𝑀 − 𝜆𝐼 is 0 4. Since det 𝑀 − 𝜆𝐼 is product of eigenvalues, one of the terms is 0, so product is 0 𝑄𝑄 𝑇 = 𝐼
  • 29. OUTLINE • Basic definitions • Subspaces and Dimensionality • Matrix functions: inverses and eigenvalue decompositions • Convex optimization
  • 30. CONVEX OPTIMIZATION • Find minimum of a function subject to solution constraints • Business/economics/ game theory • Resource allocation • Optimal planning and strategies • Statistics and Machine Learning • All forms of regression and classification • Unsupervised learning • Control theory • Keeping planes in the air!
  • 31. CONVEX SETS • A set 𝐶 is convex if ∀𝑥, 𝑦 ∈ 𝐶 and ∀𝛼 ∈ 0,1 𝛼𝑥 + 1 − 𝛼 𝑦 ∈ 𝐶 • Line segment between points in 𝐶 also lies in 𝐶 • Ex • Intersection of halfspaces • 𝐿 𝑝 balls • Intersection of convex sets
  • 32. CONVEX FUNCTIONS • A real-valued function 𝑓 is convex if dom𝑓 is convex and ∀𝑥, 𝑦 ∈ dom𝑓 and ∀𝛼 ∈ 0,1 𝑓 𝛼𝑥 + 1 − 𝛼 𝑦 ≤ 𝛼𝑓 𝑥 + 1 − 𝛼 𝑓 𝑦 • Graph of 𝑓 upper bounded by line segment between points on graph 𝑥, 𝑓 𝑥 𝑦, 𝑓 𝑦
  • 33. GRADIENTS • Differentiable convex 𝑓 with dom𝑓 = ℝ 𝑑 • Gradient 𝛻𝑓 at 𝑥 gives linear approximation 𝛻𝑓 = 𝛿𝑓 𝛿𝑥1 … 𝛿𝑓 𝛿𝑥 𝑑 𝑇 𝑓 𝑥 𝑓 𝑥 + 𝑤 𝑇 𝛻𝑓
  • 34. GRADIENTS • Differentiable convex 𝑓 with dom𝑓 = ℝ 𝑑 • Gradient 𝛻𝑓 at 𝑥 gives linear approximation 𝛻𝑓 = 𝛿𝑓 𝛿𝑥1 … 𝛿𝑓 𝛿𝑥 𝑑 𝑇 𝑓 𝑥 𝑓 𝑥 + 𝑤 𝑇 𝛻𝑓
  • 35. GRADIENT DESCENT • To minimize 𝑓 move down gradient • But not too far! • Optimum when 𝛻𝑓 = 0 • Given 𝑓, learning rate 𝛼, starting point 𝑥0 𝑥 = 𝑥0 Do until 𝛻𝑓 = 0 𝑥 = 𝑥 − 𝛼𝛻𝑓
  • 36. STOCHASTIC GRADIENT DESCENT • Many learning problems have extra structure 𝑓 𝜃 = 𝑖=1 𝑛 𝐿 𝜃; 𝒙𝑖 • Computing gradient requires iterating over all points, can be too costly • Instead, compute gradient at single training example
  • 37. STOCHASTIC GRADIENT DESCENT • Given 𝑓 𝜃 = 𝑖=1 𝑛 𝐿 𝜃; 𝒙𝑖 , learning rate 𝛼, starting point 𝜃0 𝜃 = 𝜃0 Do until 𝑓 𝜃 nearly optimal For 𝑖 = 1 to 𝑛 in random order 𝜃 = 𝜃 − 𝛼𝛻𝐿 𝜃; 𝒙𝑖 • Finds nearly optimal 𝜃
  • 38. MINIMIZE 𝑖=1 𝑛 𝑦𝑖 − 𝜃 𝑇 𝒙𝑖 2