LINEAR ALGEBRA & NUMERICAL
ANALYSIS
LANA — Complete Notes
Prof. Dr. Debanjan Roy
Weeks 1–13
, WEEK 1 — Introduction: Matrices & Vectors in Data
Science & AI
• Matrices & Vectors are used in Data Science and AI
• Computer Programming is needed for solving big data problems
• Used in Networks
What is a Vector?
• Physics: Vector has Magnitude and Direction
• Mathematics: Considers position in 2D Plane or 3D Space
• Computer Science: Deals with Dimensions — any number (3D, 4D, 2046D, 4028D...)
WEEK 2 — Vectors & Matrices: The Language of
Data
• Linear Algebra = Mathematics of Data
• Matrices & Vectors = Language of Data
• Interpretable = Something that can be understood and explained (Numbers are
interpretable)
• Everything is written in numbers — whether it's images, X-rays, gamma rays, etc.
Vector
• An Ordered List of Numbers
◦ Example: [-1, 0.0, 3.6, -7.2] → 4-Dimensional (4D) vector
◦ Written as column (matrix form) or row
• n-size vector = n-vector
• These numbers are called scalars
• Zero Vector: (0, 0, ...0) — size n×1
• Unit Vector: Vector whose magnitude is 1
Vector in Python (NumPy)
import numpy as np
as_list = [1, 2, 3]
as_array = np.array([1, 2, 3]) # 1D array
row_vec = np.array([[1, 2, 3]]) # Row vector
col_vec = np.array([[1],[2],[3]]) # Column vector
• Vector = Single Row
• Matrices = Multiple Rows
• Dimensions = Number of values in your vector
• For Column: ([[col1],[col2],[col3],...])
• For Rows: ([a, b, c, ...])
ANALYSIS
LANA — Complete Notes
Prof. Dr. Debanjan Roy
Weeks 1–13
, WEEK 1 — Introduction: Matrices & Vectors in Data
Science & AI
• Matrices & Vectors are used in Data Science and AI
• Computer Programming is needed for solving big data problems
• Used in Networks
What is a Vector?
• Physics: Vector has Magnitude and Direction
• Mathematics: Considers position in 2D Plane or 3D Space
• Computer Science: Deals with Dimensions — any number (3D, 4D, 2046D, 4028D...)
WEEK 2 — Vectors & Matrices: The Language of
Data
• Linear Algebra = Mathematics of Data
• Matrices & Vectors = Language of Data
• Interpretable = Something that can be understood and explained (Numbers are
interpretable)
• Everything is written in numbers — whether it's images, X-rays, gamma rays, etc.
Vector
• An Ordered List of Numbers
◦ Example: [-1, 0.0, 3.6, -7.2] → 4-Dimensional (4D) vector
◦ Written as column (matrix form) or row
• n-size vector = n-vector
• These numbers are called scalars
• Zero Vector: (0, 0, ...0) — size n×1
• Unit Vector: Vector whose magnitude is 1
Vector in Python (NumPy)
import numpy as np
as_list = [1, 2, 3]
as_array = np.array([1, 2, 3]) # 1D array
row_vec = np.array([[1, 2, 3]]) # Row vector
col_vec = np.array([[1],[2],[3]]) # Column vector
• Vector = Single Row
• Matrices = Multiple Rows
• Dimensions = Number of values in your vector
• For Column: ([[col1],[col2],[col3],...])
• For Rows: ([a, b, c, ...])