Module 2_ 2. Linear Algebra Flashcards
Why to learn Linear Algebra?
-As humans our visualization is limited to 1-D,2-D and 3-D
-We use linear algebra to distinguish points in higher dimensions like 4-D,5-D,10-D,100-D,etc.
Write a point/vector in 2-D,3-D and n-D showing its co-ordinates.
2-D
- p=[2,3]
3-D
- p=[2,3,5]
n-D
- p=[2,3,…….]
What is the distance of a point from origin in 2-D,3-D and n-D?
2-D
- d = √(a^2 + b^2)
3-D
- d = √(a^2 + b^2 + c^2)
n-D
- d = √(a1^2 + a2^2 + ……. + an^2)
What is the distance between two points in 2-D,3-D and n-D?
2-D
- d = √((a1 - b1)^2 + (a2 - b2)^2)
3-D
- d = √((a1 - b1)^2 + (a2 - b2)^2 + (a3 - b3)^2)
n-D
- d = √((a1 - b1)^2 + (a2 - b2)^2 + …….. + (an - bn)^2)
OR
- √( Σ (ai-bi)^2 )
Explain how to do Vector Addition
a = [a1,a2,……an]
b = [b1,b2,……bn]
c = a + b = [a1 + b1, a2 + b2, ………. , an + bn]
Explain how to do Vector Multiplication
a = [a1,a2,……an]
b = [b1,b2,……bn]
a.b = a1b1 + a2b2 + ……. + anbn
= aT.b
= Σ aibi
Also,
a.b = ||a||.||b||.cosθ
Here,
||a|| = distance of a from origin =√(a1^2 + a2^2)
||b|| = distance of b from origin =√b1^2 + b2^2)
θ = cosinv{(a1b1 + a2b2)/||a||.||b||}
Also if a and b are perpendicular,
a.b = ||a||.||b||.cos90
= 0
Explain how to do Projection of vector a on vector b
We know,
d = ||a||.cosθ
Also,
a.b = ||a||.||b||.cosθ
= d.||b||
Therefore,
d = (a.b)/||b||
What is a Unit vector?
a^ = a/||a||
-a^ is in same direction as a
-||a^|| = 1
What is the equation of a line(2-D) / plane(3-D) / hyperplane(n-D)?
2-D
- w0 + w1x1 + w2x2 = 0
3-D
- w0 + w1x1 + w2x2 + w3x3 = 0
n-D
- w0 + w1x1 + ……… + wnxn = 0
OR
- wo + Σ wixi = 0
OR
- w0 + wT.X = 0
If line passes through origin —-> c = 0 ——> w0 = 0
So equation in n-D becomes
wT.X = 0
w.x = wT.X = ||w||||x||cosθ = 0 —————> θ = 90 degree
What is the distance of a point from a line(2-D) / plane(3-D) / hyperplane(n-D)?
d = (w.p) /||w||
What is the equation of a circle(2-D) / sphere(3-D) / hypersphere(n-D)?
2-D
- x1^2 + x2^2 = r^2 ———> P lies on the circle
- x1^2 + x2^2 < r^2 ———> P lies inside the circle
- x1^2 + x2^2 > r^2 ———> P lies outside the circle
3-D
- x1^2 + x2^2 + x3^2 = r^2 ———> P lies on the sphere
- x1^2 + x2^2 + x3^2 < r^2 ———> P lies inside the sphere
- x1^2 + x2^2 + x3^2 > r^2 ———> P lies outside the sphere
n-D
- x1^2 + x2^2 + ………. + xn^2 = r^2 ———> P lies on the hypersphere
- x1^2 + x2^2 + ………. + xn^2 < r^2 ———> P lies inside the hypersphere
- x1^2 + x2^2 + ………. + xn^2 > r^2 ———> P lies outside the hypersphere
OR
- Σ xi^2 = r^2 ———> P lies on the hypersphere
- Σ xi^2 < r^2 ———> P lies inside the hypersphere
- Σ xi^2 > r^2 ———> P lies outside the hypersphere
What is the equation of a ellipse(2-D) / ellipsoid(3-D) / hyperellipsoid(n-D)?
2-D
- (x1^2 / a1^2) + (x2^2 / a2^2) = 1 ———> P lies on the ellipse
- (x1^2 / a1^2) + (x2^2 / a2^2) < 1 ———> P lies inside the ellipse
- (x1^2 / a1^2) + (x2^2 / a2^2) > 1 ———> P lies outside the ellipse
3-D
- (x1^2 / a1^2) + (x2^2 / a2^2) + (x3^2 / a3^2) = 1 ———> P lies on the ellipsoid
- (x1^2 / a1^2) + (x2^2 / a2^2) + (x3^2 / a3^2) < 1 ———> P lies inside the ellipsoid
- (x1^2 / a1^2) + (x2^2 / a2^2) + (x3^2 / a3^2) > 1 ———> P lies outside the ellipsoid
n-D
- (x1^2 / a1^2) + (x2^2 / a2^2) + ……….. + (xn^2 / an^2) = 1 ———> P lies on the hyperellipsoid
- (x1^2 / a1^2) + (x2^2 / a2^2) + ……….. + (xn^2 / an^2) < 1 P lies inside the hyperellipsoid
- (x1^2 / a1^2) + (x2^2 / a2^2) + ……….. + (xn^2 / an^2) > 1 ———> P lies outside the hyperellipsoid
OR
- Σ xi^2 = r^2 ———> P lies on the hyperellipsoid
- Σ xi^2 < r^2 ———> P lies inside the hyperellipsoid
- Σ xi^2 > r^2 ———> P lies outside the hyperellipsoid
What is the equation of a square or rectangle(2-D) / hypercube(3-D) / hypercuboid(n-D)?
- No equation
-Use simple if else conditions