Posts

Showing posts with the label linear algebra

Deriving the Equation of a Plane Through A Perpendicular to the Vector A

Let A be a non-zero vector in ℝ³, and also regard its endpoint as the point through which the plane passes: A = (a 1 , a 2 , a 3 ) T ≠ (0, 0, 0) T . Let P be an arbitrary point on the plane: P = (x, y, z) T . The displacement from A to P is P − A = (x − a 1 , y − a 2 , z − a 3 ) T . Because the plane is perpendicular to A , the vector A is its normal vector. Every displacement P − A lying in the plane must therefore be perpendicular to A . Perpendicular vectors have a dot product of zero. Hence A · ( P − A ) = 0. Writing this condition in coordinates gives a 1 (x − a 1 ) + a 2 (y − a 2 ) + a 3 (z − a 3 ) = 0. Expanding the brackets: a 1 x − a 1 2 + a 2 y − a 2 2 + a 3 z − a 3 2 = 0. Move the squared terms to the right-hand side: a 1 x + a 2 y + a 3 z = a 1 2 + a 2 2 + a 3 2 . In vector notation, this becomes A · P = A · A = ‖ A ‖ 2 . ...

Deriving the Outer-Product Matrix BAᵀ from Matrix Multiplication

Let A, B and X be column vectors in ℝ³: A = a₁ a₂ a₃ , B = b₁ b₂ b₃ , X = x y z . BAᵀX = B(AᵀX). Matrix multiplication is associative, so AᵀX may be evaluated first. Since Aᵀ is a 1 × 3 row matrix and X is a 3 × 1 column matrix, their product is a scalar: AᵀX = a₁x + a₂y + a₃z. Therefore, BAᵀX = b₁ b₂ b₃ (a₁x + a₂y + a₃z). The quantity in parentheses is a scalar, so it multiplies every component of B: BAᵀX = b₁a₁x + b₁a₂y + b₁a₃z b₂a₁x + b₂a₂y + b₂a₃z b₃a₁x + b₃a₂y + b₃a₃z . Collect the coefficients of x, y and z into a matrix multiplying X: BAᵀX = b₁a₁ b₁a₂ b₁a₃ b₂a₁ b₂a₂ b...

Constructing the [v]ₓ Matrix from Skew-Symmetry and the Null Space

Let v = p q r ≠ 0 0 0 The objective is to construct the standard 3 × 3 matrix [v]ₓ associated with v, without assuming its entries in advance. Begin with two requirements: Kᵀ = −K Kv = 0. The first condition requires skew-symmetry. The second requires v to lie in the null space of K. 1. Write the general skew-symmetric matrix Since Kᵀ = −K, the diagonal entries must be zero and entries reflected across the diagonal must have opposite signs. Therefore, K = 0 α β −α 0 γ −β −γ 0 At this stage, α, β and γ are unknown. 2. Require Kv = 0 0 α β −α 0 γ −β −γ 0 p q r ...

Constructing the General 3 × 3 Skew-Symmetric Matrix from First Principles

A skew-symmetric matrix is a square matrix whose transpose equals its negative. The construction below begins with an arbitrary 3 × 3 matrix, subtracts its transpose, and derives the complete general form without assuming the result in advance. K is skew-symmetric precisely when Kᵀ = −K. 1. Begin with an arbitrary matrix Let A = a b c d e f g h i and Aᵀ = a d g b e h c f i Transposition reflects the entries across the main diagonal: rows become columns and columns become rows. 2. Subtract the transpose Define K = A − Aᵀ. Subtract corresponding entries: K = a−a b−d c−g d−b e−e f−h g−c h−f i−i The diagonal entries cancel: ...

Rank, Nullity and Column Space: Understanding What a Matrix Preserves and Loses

A matrix transforms input vectors into output vectors. Some independent directions survive, some are combined, and some may disappear completely into the zero vector. Span, dimension, column space, rank, null space and nullity describe this process precisely. input space → matrix transformation → column space 1. Span: all reachable combinations Given vectors v₁, v₂, …, vₖ, their span is the set of every vector that can be made by scaling and adding them: Span{v₁, v₂, …, vₖ} = {c₁v₁ + c₂v₂ + ⋯ + cₖvₖ : c₁, c₂, …, cₖ ∈ ℝ}. One non-zero direction spans a line through the origin. Two independent directions span a plane through the origin. Three independent directions in ℝ³ span all of ℝ³. 2. Independence and dimension Vectors are linearly independent when none of them can be constructed from the others. Each independent vector contributes a genuinely new direction. A dependent vector contributes no new...

A Direct Proof That a 3 × 3 Skew-Symmetric Matrix Sends Its Defining Vector to Zero

Image
Let v = (p, q, r) T be a vector in ℝ³. From its three components, form the 3 × 3 skew-symmetric matrix K = ( 0 −r q r 0 −p −q p 0 ) . The entries reflected across the main diagonal have opposite signs, while every diagonal entry is zero. Therefore, K T = −K. Multiplication by the vector Matrix-vector multiplication can be written as a linear combination of the columns of K. The first column is multiplied by p, the second by q, and the third by r: K v = p ( 0 r −q ) + q ( −r 0 p ) + r ( q −p 0 ) . Distributing p, q and r gives K v = ( 0 · p + (−r) · q + q · r r · p + 0 · q + (−p) · r −q · p + p · q + 0 · r ) . Combining the entries in each row produces ...

Proof That M − Mᵀ Is Skew-Symmetric for a Real 3 × 3 Matrix

Image
This proof demonstrates that subtracting the transpose of any real 3 × 3 matrix from the original matrix produces a 3 × 3 skew-symmetric matrix. Construction Let M = ( a b c d e f g h i ) Its transpose is M T = ( a d g b e h c f i ) Subtracting the transpose from the original matrix gives K = M − M T = ( 0 b − d c − g d − b 0 f − h g − c h − f 0 ) ...

Deriving the Direction Cosines of a Unit Vector

Direction Cosines of a Unit Vector A vector in 3D can be written as v = (x, y, z). This vector points from the origin to the point (x, y, z). Its direction depends on how much it travels in the x-direction, the y-direction and the z-direction. Magnitude of the Vector The magnitude, or length, of v is |v| = √(x² + y² + z²). This comes from the 3D version of Pythagoras' theorem. The vector has three perpendicular components: x, y and z. Squaring them, adding them, and taking the square root gives the total length. Unit Vector A unit vector is a vector with length 1. To turn v into a unit vector, divide every component by the magnitude of v: v̂ = (1 / |v|)(x, y, z). So v̂ = (x / |v|, y / |v|, z / |v|). This new vector points in the same direction as v, but its length is exactly 1. The Dot Product The dot product has two important forms. Algebraic form: a · b = a₁b₁ + a₂b₂ + a₃b₃. Geometric form: a · b = |a||b|cos(θ). The algebraic form uses co...

The Algebra Behind the Cross Product Magnitude

Image
This expansion shows why the expression |A| 2 |B| 2 − (A · B) 2 is equal to the squared magnitude of the cross product: |A × B| 2 Let A = (a 1 , a 2 , a 3 ) and B = (b 1 , b 2 , b 3 ) Then: |A| 2 = a 1 2 + a 2 2 + a 3 2 |B| 2 = b 1 2 + b 2 2 + b 3 2 Therefore: |A| 2 |B| 2 = (a 1 2 + a 2 2 + a 3 2 )(b 1 2 + b 2 2 + b 3 2 ) Expanding: |A| 2 |B| 2 = a 1 2 b 1 2 + a 1 2 b 2 2 + a 1 2 b 3 2 + a 2 2 b 1 2 + a 2 2 b 2 2 + a 2 2 b 3 2 + a 3 2 b 1 2 + a 3 2 b 2 2 + a 3 2 b 3 2 Now expand the dot product. A · B = a 1 b 1 + a 2 b 2 + a 3 b 3 So: (A · B) 2 = (a 1 b 1 + a 2 b 2 + a 3 b 3 ) 2 Expanding: (A · B) 2 = a 1 2 b 1 2 + a 2 2 b 2 2 + a 3 2 b 3 2 + 2a 1 b 1 a 2 b 2 + 2a 1 b 1 a 3 b 3 + 2a 2 b 2 a 3 b 3 Now subtract: |A| 2 |B| 2 − (A · B) 2 The matching diagonal terms cancel: a 1 2 b 1 2 ,   a 2 2 b 2 2 ,   a 3 2 b 3 2 This leaves: |A| 2 |B| 2 − (A · B) 2 = a 1 2...

A Clear Introduction to Diagonal Matrices

Image
A diagonal matrix is a square matrix in which every entry away from the main (leading) diagonal is zero. The leading diagonal runs from the top-left corner of the matrix to the bottom-right corner, and these diagonal entries are the only positions that may contain non-zero values. All off-diagonal entries must be zero. The diagonal entries themselves can be any real numbers, including zero. This strict structure is what makes diagonal matrices especially simple to analyse and compute with in linear algebra. Examples of Diagonal Matrices The general 2×2 diagonal matrix has the form: (a 0) (0 b) The general 3×3 diagonal matrix has the form: (a 0 0) (0 b 0) (0 0 c) In both cases, the values on the leading diagonal (a, b, c, …) are the only entries that may be non-zero. Every position above or below this diagonal is fixed at 0. The General n×n Diagonal Matrix For an n×n dia...

Why the Line ax + by = 0 Passes Through the Point (−b, a)

Image
Why the Line ax + by = 0 Passes Through the Point (−b, a) In ℝ² , the equation ax + by = 0 describes a line that is perpendicular to the vector (a, b) . This article explains exactly why—and why that line always passes through the point (−b, a) . 1. Start with the Vector (a, b) Consider the vector (a, b) . To find a line perpendicular to it, we need a vector whose dot product with (a, b) is zero. Try the vector (−b, a) : (a, b) · (−b, a) = a(−b) + b(a) = −ab + ab = 0 Therefore, (−b, a) is perpendicular to (a, b) . 2. Any Scalar Multiple Also Works If (−b, a) is perpendicular to (a, b) , then any multiple λ(−b, a) is also perpendicular: (a, b) · [λ(−b, a)] = λ[(a, b) · (−b, a)] = λ · 0 = 0 Let this perpendicular vector be (x, y) . Then (x, y) = λ(−b, a) Every point on the line comes from a particular choice of λ . 3. Converting to an Equation Since (x, y) is perpendicular to (a, b) , we have: (a, b) · (x, y) = 0 Expanding ...

2×2 Orthogonal Matrix Mastery — A Generalised Construction

Image
2×2 Orthogonal Matrix Mastery — A Generalised Construction Orthogonal matrices in two dimensions reveal one of the cleanest structures in linear algebra. A 2×2 matrix is orthogonal when its columns (and rows) satisfy two conditions: They are perpendicular (their dot product is zero); They have unit length (their magnitude is one). This article presents a clear generalisation: any pair of perpendicular vectors with equal magnitude can be normalised to form an orthogonal matrix. 1. Begin with two perpendicular vectors Let the first vector be: (a, b) A perpendicular vector can be chosen as: (−b, a) Their dot products confirm orthogonality: (a, b) · (−b, a) = −ab + ab = 0 (a, −b) · (b, a) = ab − ab = 0 2. Compute their shared magnitude Both vectors have the same length: |(a, b)| = √(a² + b²) We can therefore normalise each one by dividing by √(a² + b²). 3. Form the matrix using the normalised vectors Place the two normalised vectors...

Orthogonal Matrices and Mutually Orthogonal Vectors

Orthogonal Matrices and Mutually Orthogonal Vectors Orthogonal matrices appear naturally throughout linear algebra, geometry, physics, and computer graphics. They preserve lengths, angles, and orientation, which makes them fundamental in describing rotations and rigid motions in three-dimensional space. This article provides a clear and carefully structured explanation of what orthogonal matrices are, why they matter, and how to verify that a given matrix is orthogonal. 1. Definition of an Orthogonal Matrix Let M be an n × n square matrix. M is called orthogonal if it satisfies: M M T = I Here: M T is the transpose of M. I is the identity matrix of the same size. Because of this property, every orthogonal matrix has a very useful consequence: M -1 = M T This means that the inverse of an orthogonal matrix is obtained simply by transposing it. This property is central to rigid-body transformations in 3D geometry and computer graphics. 2...

Linear Transformations in ℝ³ and 3×3 Matrices

Linear Transformations in ℝ³ and 3×3 Matrices Matrices give us a compact way to describe linear transformations in three-dimensional space. A linear transformation is a mapping T : ℝ³ → ℝ³ that sends a point with position vector (x, y, z) to another point, according to a rule with two key properties. What Makes a Transformation Linear? A transformation T : ℝ³ → ℝ³ is called linear if, for all real numbers λ and all vectors (x, y, z) in ℝ³, T(λx, λy, λz) = λ T(x, y, z), and for all vectors (x₁, y₁, z₁) and (x₂, y₂, z₂) in ℝ³, T(x₁ + x₂, y₁ + y₂, z₁ + z₂) = T(x₁, y₁, z₁) + T(x₂, y₂, z₂). The point that (x, y, z) is sent to is called the image of (x, y, z) under T. The Standard Basis Vectors To find the matrix that represents a particular transformation, it is enough to know what happens to three special vectors, called the standard basis for ℝ³: î = (1, 0, 0) ĵ = (0, 1, 0) k̂ = (0, 0, 1) Once we know the images of î, ĵ and k̂, th...

Finding the Inverse of a 2x2 Matrix from Scratch

Finding the Inverse of a 2x2 Matrix from Scratch This post shows a complete, step-by-step derivation of the inverse of a 2x2 matrix. Everything is expressed using stable, browser-safe ASCII formatting so the layout displays correctly on all devices and all templates. FIRST PART. Start with the matrix equation: A = [[a, b], [c, d]] A^(-1) = [[w, x], [y, z]] Goal: A * A^(-1) = I This produces the column equations: [aw + by, cw + dy]^T = [1, 0]^T [ax + bz, cx + dz]^T = [0, 1]^T Which gives the four equations: aw + by = 1 cw + dy = 0 ax + bz = 0 cx + dz = 1 SECOND PART. Use the first two equations to find w. aw + by = 1 cw + dy = 0 Multiply: (ad)w + (bd)y = d (first eq multiplied by d) (bc)w + (bd)y = 0 (second eq multiplied by b) Subtract: (ad - bc)w = d w = d / (ad - bc) (ad - bc != 0) THIRD PART. Use the next pair to find x. ax + bz = 0 cx + dz = 1 Multiply: (ad)x + (bd)z = 0 (bc)x + (bd)z = b Subtract: (ad - bc)...

Converting the Vector Equation of a Line into Cartesian Form

Image
Converting the Vector Equation of a Line into Cartesian Form A straight line in three-dimensional space can be expressed using vectors. One important vector form is (𝐑 − 𝐀) × 𝐁 = 0 This equation states that the displacement vector from a fixed point 𝐀 to a general point 𝐑 is parallel to the direction vector 𝐁. Two non-zero vectors have a zero cross product precisely when they are parallel. From this fact, the Cartesian (symmetric) equation of the line can be derived. 1. Substituting Coordinate Vectors The general point on the line is written as 𝐑 = (x, y, z) The fixed point is 𝐀 = (x₁, y₁, z₁) The direction vector is 𝐁 = (l, m, n) Substituting these into the vector equation yields: ((x, y, z) − (x₁, y₁, z₁)) × (l, m, n) = 0 which simplifies to: (x − x₁, y − y₁, z − z₁) × (l, m, n) = 0 2. Using the Condition for a Zero Cross Product If two non-zero vectors have a zero cross product, then one is a scalar multiple of the other. T...