ELIAS EBNER

  • Home
  • Blog
  • Courses
  • About

Linear Algebra

  1. Vectors
    1. Scalars
    2. Vectors vs Sets
    3. Addition and Subtraction
    4. Scalar Multiplication
    5. Zero Vectors
    6. Linear Combinations
    7. Real Dot Product
    8. Length of a Vector
    9. Orthogonal Vectors
    10. Parallel Vectors
    11. Angle Between Vectors
    12. Unit Vectors
  2. Matrices
    1. Notation
    2. Indexing
    3. Submatrices
    4. Matrix-by-Vector Product
    5. Addition and Subtraction
    6. Scalar Multiplication
    7. Transpose
    8. Symmetries
    9. Matrix Multiplication
    10. Identity Matrix
    11. Non-Negative Integer Powers
    12. Reverse Order Law of Transposition
  3. Linear Systems
    1. Inverse Matrices
    2. Singular Matrices
    3. Linear Dependence
    4. Solutions
  4. Planes
    1. Vector Cross Product
  5. Gaussian Elimination
Linear Algebra β€ΊPlanes β€ΊVector Cross Product

Vector Cross Product

The cross product is an operation on vectors, but I didn’t include it in the vectors section because I felt like it would be nice to introduce this operation after covering planes, but I didn’t want to introduce planes before having introduced linear systems, so here we are.

In the lesson about planes, we have found the equation of a plane from three given points. The way we did this was by forming two vectors from the three points given - say uβƒ—\vec{u}u and vβƒ—\vec{v}v - and we created a linear system of equations by saying that the vector we’re looking for has to be orthogonal to both of them. If nβƒ—\vec{n}n is the normal vector we are looking for, that would be

{nβƒ—β‹…uβƒ—=0nβƒ—β‹…vβƒ—=0.\begin{cases} \vec{n} \cdot \vec{u} = 0 \\ \vec{n} \cdot \vec{v} = 0. \end{cases}{nβ‹…u=0nβ‹…v=0.​

The cross product solves exactly this problem. The cross product between two vectors u⃗\vec{u}u and v⃗\vec{v}v, denoted by the symbol u⃗×v⃗\vec{u} \times \vec{v}u×v, returns a vector orthogonal to u⃗\vec{u}u and v⃗\vec{v}v.

Derivation

We will derive the cross product through a similar process used to find a vector orthogonal to two other vectors as we did in the lesson about planes.

We are given two three-dimensional vectors

uβƒ—=[u1u2u3],vβƒ—=[v1v2v3].\vec{u} = \begin{bmatrix} u_1 \\ u_2 \\ u_3 \end{bmatrix}, \quad \vec{v} = \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix}.u=​u1​u2​u3​​​,v=​v1​v2​v3​​​.

We want to find a vector n⃗\vec{n}n such that

nβƒ—βŠ₯uβƒ—,nβƒ—βŠ₯vβƒ—.\vec{n} \perp \vec{u}, \quad \vec{n} \perp \vec{v}.nβŠ₯u,nβŠ₯v.

From our lesson about orthogonal vectors, we know that, when two vectors are orthogonal, their dot product equals 000.

This means that

n⃗⋅u⃗=0,\vec{n} \cdot \vec{u} = 0,n⋅u=0,

and

n⃗⋅v⃗=0\vec{n} \cdot \vec{v} = 0n⋅v=0

must both be true. We have a system of equations:

{nβƒ—β‹…uβƒ—=0nβƒ—β‹…vβƒ—=0{[n1n2n3]β‹…[u1u2u3]=0[n1n2n3]β‹…[v1v2v3]=0{n1u1+n2u2+n3u3=0n1v1+n2v2+n3v3=0.\begin{align*} &\begin{cases} \vec{n} \cdot \vec{u} = 0 \\ \vec{n} \cdot \vec{v} = 0 \end{cases} \\ &\begin{cases} \begin{bmatrix} n_1 \\ n_2 \\ n_3 \end{bmatrix} \cdot \begin{bmatrix} u_1 \\ u_2 \\ u_3 \end{bmatrix} = 0 \\[2em] \begin{bmatrix} n_1 \\ n_2 \\ n_3 \end{bmatrix} \cdot \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} = 0 \\ \end{cases} \\ &\begin{cases} n_1 u_1 + n_2 u_2 + n_3 u_3 = 0 \\ n_1 v_1 + n_2 v_2 + n_3 v_3 = 0. \end{cases} \end{align*}​{nβ‹…u=0nβ‹…v=0β€‹βŽ©βŽ¨βŽ§β€‹β€‹n1​n2​n3​​​⋅​u1​u2​u3​​​=0​n1​n2​n3​​​⋅​v1​v2​v3​​​=0​{n1​u1​+n2​u2​+n3​u3​=0n1​v1​+n2​v2​+n3​v3​=0.​​

We can multiply the top equation by v3v_3v3​ and the bottom equation by u3u_3u3​. That gets us to

{n1u1v3+n2u2v3+n3u3v3=0n1u3v1+n2u3v2+n3u3v3=0.\begin{cases} n_1 u_1 v_3 + n_2 u_2 v_3 + n_3 u_3 v_3 = 0 \\ n_1 u_3 v_1 + n_2 u_3 v_2 + n_3 u_3 v_3 = 0. \end{cases}{n1​u1​v3​+n2​u2​v3​+n3​u3​v3​=0n1​u3​v1​+n2​u3​v2​+n3​u3​v3​=0.​

We now subtract the second equation from the first to get

n1u1v3βˆ’n1u3v1+n2u2v3βˆ’n2u3v2+n3u3v3βˆ’n3u3v3=0.n_1 u_1 v_3 - n_1 u_3 v_1 + n_2 u_2 v_3 - n_2 u_3 v_2 + n_3 u_3 v_3 - n_3 u_3 v_3 = 0.n1​u1​v3β€‹βˆ’n1​u3​v1​+n2​u2​v3β€‹βˆ’n2​u3​v2​+n3​u3​v3β€‹βˆ’n3​u3​v3​=0.

In the resulting equation, n3u3v3βˆ’n3u3v3n_3 u_3 v_3 - n_3 u_3 v_3n3​u3​v3β€‹βˆ’n3​u3​v3​ cancels out, and the rest can be factorized:

n1(u1v3βˆ’u3v1)+n2(u2v3βˆ’u3v2)=0.n_1 (u_1 v_3 - u_3 v_1) + n_2 (u_2 v_3 - u_3 v_2) = 0.n1​(u1​v3β€‹βˆ’u3​v1​)+n2​(u2​v3β€‹βˆ’u3​v2​)=0.

Remember, we are given uβƒ—\vec{u}u and vβƒ—\vec{v}v, and we want to find some expression for the components of nβƒ—\vec{n}n. The system of equations has infinitely many solutions, and we can choose any of the possible solutions. We will intelligently pick our values for n1n_1n1​ and n2n_2n2​ such that the terms cancel out and the equation is solved:

n1=u2v3βˆ’u3v2n2=βˆ’(u1v3βˆ’u3v1).\begin{align*} n_1 &= u_2 v_3 - u_3 v_2 \\ n_2 &= -(u_1 v_3 - u_3 v_1). \end{align*}n1​n2​​=u2​v3β€‹βˆ’u3​v2​=βˆ’(u1​v3β€‹βˆ’u3​v1​).​

Substituting into our equation, we get

0=n1(u1v3βˆ’u3v1)+n2(u2v3βˆ’u3v2)=(u2v3βˆ’u3v2)(u1v3βˆ’u3v1)βˆ’(u1v3βˆ’u3v1)(u2v3βˆ’u3v2)=(u1v3βˆ’u3v1)(u2v3βˆ’u3v2)βˆ’(u1v3βˆ’u3v1)(u2v3βˆ’u3v2)=0,\begin{align*} 0 &= n_1 (u_1 v_3 - u_3 v_1) + n_2 (u_2 v_3 - u_3 v_2) \\ &= (u_2 v_3 - u_3 v_2) (u_1 v_3 - u_3 v_1) - (u_1 v_3 - u_3 v_1) (u_2 v_3 - u_3 v_2) \\ &= (u_1 v_3 - u_3 v_1) (u_2 v_3 - u_3 v_2) - (u_1 v_3 - u_3 v_1) (u_2 v_3 - u_3 v_2) \\ &= 0, \end{align*}0​=n1​(u1​v3β€‹βˆ’u3​v1​)+n2​(u2​v3β€‹βˆ’u3​v2​)=(u2​v3β€‹βˆ’u3​v2​)(u1​v3β€‹βˆ’u3​v1​)βˆ’(u1​v3β€‹βˆ’u3​v1​)(u2​v3β€‹βˆ’u3​v2​)=(u1​v3β€‹βˆ’u3​v1​)(u2​v3β€‹βˆ’u3​v2​)βˆ’(u1​v3β€‹βˆ’u3​v1​)(u2​v3β€‹βˆ’u3​v2​)=0,​

because the terms cancel out.

We now have our expressions for n1n_1n1​ and n2n_2n2​, but we’re missing n3n_3n3​. To find n3n_3n3​, we substitute our chosen values for n1n_1n1​ and n2n_2n2​ into our original linear system of equations and solve it:

{n1u1+n2u2+n3u3=0n1v1+n2v2+n3v3=0{(u2v3βˆ’u3v2)u1βˆ’(u1v3βˆ’u3v1)u2+n3u3=0(u2v3βˆ’u3v2)v1βˆ’(u1v3βˆ’u3v1)v2+n3v3=0{n3u3=(u1v3βˆ’u3v1)u2βˆ’(u2v3βˆ’u3v2)u1n3v3=(u1v3βˆ’u3v1)v2βˆ’(u2v3βˆ’u3v2)v1{n3=u1u2v3βˆ’u2u3v1βˆ’u1u2v3+u1u3v2u3n3=u1v2v3βˆ’u3v1v2βˆ’u2v1v3+u3v1v2v3{n3=βˆ’u2u3v1+u1u3v2u3n3=u1v2v3βˆ’u2v1v3v3{n3=u3(u1v2βˆ’u2v1)u3n3=v3(u1v2βˆ’u2v1)v3{n3=u1v2βˆ’u2v1n3=u1v2βˆ’u2v1.\begin{align*} &\begin{cases} n_1 u_1 + n_2 u_2 + n_3 u_3 = 0 \\ n_1 v_1 + n_2 v_2 + n_3 v_3 = 0 \end{cases} \\ &\begin{cases} (u_2 v_3 - u_3 v_2) u_1 - (u_1 v_3 - u_3 v_1) u_2 + n_3 u_3 = 0 \\ (u_2 v_3 - u_3 v_2) v_1 - (u_1 v_3 - u_3 v_1) v_2 + n_3 v_3 = 0 \end{cases} \\ &\begin{cases} n_3 u_3 = (u_1 v_3 - u_3 v_1) u_2 - (u_2 v_3 - u_3 v_2) u_1 \\ n_3 v_3 = (u_1 v_3 - u_3 v_1) v_2 - (u_2 v_3 - u_3 v_2) v_1 \end{cases} \\ &\begin{cases} n_3 = \dfrac{u_1 u_2 v_3 - u_2 u_3 v_1 - u_1 u_2 v_3 + u_1 u_3 v_2}{u_3} \\[1em] n_3 = \dfrac{u_1 v_2 v_3 - u_3 v_1 v_2 - u_2 v_1 v_3 + u_3 v_1 v_2}{v_3} \end{cases} \\[2em] &\begin{cases} n_3 = \dfrac{- u_2 u_3 v_1 + u_1 u_3 v_2}{u_3} \\[1em] n_3 = \dfrac{u_1 v_2 v_3 - u_2 v_1 v_3}{v_3} \end{cases} \\[2em] &\begin{cases} n_3 = \dfrac{u_3 (u_1 v_2 - u_2 v_1)}{u_3} \\[1em] n_3 = \dfrac{v_3 (u_1 v_2 - u_2 v_1)}{v_3} \end{cases} \\ &\begin{cases} n_3 = u_1 v_2 - u_2 v_1 \\ n_3 = u_1 v_2 - u_2 v_1. \end{cases} \end{align*}​{n1​u1​+n2​u2​+n3​u3​=0n1​v1​+n2​v2​+n3​v3​=0​{(u2​v3β€‹βˆ’u3​v2​)u1β€‹βˆ’(u1​v3β€‹βˆ’u3​v1​)u2​+n3​u3​=0(u2​v3β€‹βˆ’u3​v2​)v1β€‹βˆ’(u1​v3β€‹βˆ’u3​v1​)v2​+n3​v3​=0​{n3​u3​=(u1​v3β€‹βˆ’u3​v1​)u2β€‹βˆ’(u2​v3β€‹βˆ’u3​v2​)u1​n3​v3​=(u1​v3β€‹βˆ’u3​v1​)v2β€‹βˆ’(u2​v3β€‹βˆ’u3​v2​)v1β€‹β€‹βŽ©βŽ¨βŽ§β€‹n3​=u3​u1​u2​v3β€‹βˆ’u2​u3​v1β€‹βˆ’u1​u2​v3​+u1​u3​v2​​n3​=v3​u1​v2​v3β€‹βˆ’u3​v1​v2β€‹βˆ’u2​v1​v3​+u3​v1​v2β€‹β€‹β€‹βŽ©βŽ¨βŽ§β€‹n3​=u3β€‹βˆ’u2​u3​v1​+u1​u3​v2​​n3​=v3​u1​v2​v3β€‹βˆ’u2​v1​v3β€‹β€‹β€‹βŽ©βŽ¨βŽ§β€‹n3​=u3​u3​(u1​v2β€‹βˆ’u2​v1​)​n3​=v3​v3​(u1​v2β€‹βˆ’u2​v1​)​​{n3​=u1​v2β€‹βˆ’u2​v1​n3​=u1​v2β€‹βˆ’u2​v1​.​​

As you can see, we get an expression for n3n_3n3​:

n3=u1v2βˆ’u2v1.n_3 = u_1 v_2 - u_2 v_1.n3​=u1​v2β€‹βˆ’u2​v1​.

We have now found a way to rewrite all components of the normal vector n⃗\vec{n}n in terms of the components of u⃗\vec{u}u and v⃗\vec{v}v, such that

nβƒ—βŠ₯uβƒ—,nβƒ—βŠ₯vβƒ—.\vec{n} \perp \vec{u}, \quad \vec{n} \perp \vec{v}.nβŠ₯u,nβŠ₯v.

That is,

nβƒ—=[u2v3βˆ’u3v2u3v1βˆ’u1v3u1v2βˆ’u2v1].\vec{n} = \begin{bmatrix} u_2 v_3 - u_3 v_2 \\ u_3 v_1 - u_1 v_3 \\ u_1 v_2 - u_2 v_1 \end{bmatrix}.n=​u2​v3β€‹βˆ’u3​v2​u3​v1β€‹βˆ’u1​v3​u1​v2β€‹βˆ’u2​v1​​​.

This is not as hard to remember as it may seem at first, because in each component, there is a subtraction taking place. Each operand of the subtraction is a product. The first operand of the product is always a component of u⃗\vec{u}u, the second is always a component of v⃗\vec{v}v.

If you look at the first operand of each subtraction, if the first operand of the product is the iiith element of u⃗\vec{u}u, the second operand of the product will be the (i+1)(i + 1)(i+1)th element of v⃗\vec{v}v. If you go past 333 - the size of the vector - it wraps around back to 111.

Looking at the second operand of each subtraction, it’s the other way around: the first operand of the product is the (i+1)(i + 1)(i+1)th element of uβƒ—\vec{u}u, and the second operand is the iiith element of vβƒ—\vec{v}v.

Hopefully, this allows you to memorize this more easily.

Properties of the Resulting Vector

If you have a vector n⃗=u⃗×v⃗\vec{n} = \vec{u} \times \vec{v}n=u×v, then n⃗\vec{n}n will tell us some information about how u⃗\vec{u}u and v⃗\vec{v}v are related to each other. Also, some interesting facts emerge.

Angle Between the Operands of the Cross Product

For example, the angle between u⃗\vec{u}u and v⃗\vec{v}v has an effect on the length of n⃗\vec{n}n.

That is, when uβƒ—\vec{u}u and vβƒ—\vec{v}v are orthogonal to each other, nβƒ—\vec{n}n reaches its maximum length of βˆ₯uβƒ—βˆ₯βˆ₯vβƒ—βˆ₯\lVert \vec{u} \rVert \lVert \vec{v} \rVertβˆ₯uβˆ₯βˆ₯vβˆ₯, whereas when uβƒ—\vec{u}u and vβƒ—\vec{v}v are parallel, nβƒ—\vec{n}n reaches its minimum length of 000.

In fact, an interesting geometric fact is that the length of u⃗×v⃗\vec{u} \times \vec{v}u×v is the same as the area of the parallelogram spanned by u⃗\vec{u}u and v⃗\vec{v}v.

Reversing the Operands

Notice how two vectors u⃗\vec{u}u and v⃗\vec{v}v always have two possible normal vectors which are orthogonal to both u⃗\vec{u}u and v⃗\vec{v}v at the same time. These two possible normal vectors point in exact opposite directions.

But the cross product only gives us one normal vector? How do we find the other? Well, for one, you could just multiply the result by the scalar βˆ’1-1βˆ’1 to reverse the direction the normal vector points to and therefore find the second normal vector.

But another, more interesting way, is by using the property of the cross product

vβƒ—Γ—uβƒ—=βˆ’(uβƒ—Γ—vβƒ—).\vec{v} \times \vec{u} = -(\vec{u} \times \vec{v}).vΓ—u=βˆ’(uΓ—v).

Therefore, reversing the order of the operands in the cross product simply finds the other possible normal vector. This also implies that the cross product is not commutative.

Example

Take the vectors

uβƒ—=[213],vβƒ—=[142].\vec{u} = \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix}, \quad \vec{v} = \begin{bmatrix} 1 \\ 4 \\ 2 \end{bmatrix}.u=​213​​,v=​142​​.

We want to find a vector orthogonal to both of these vectors. That is

n⃗=u⃗×v⃗.\vec{n} = \vec{u} \times \vec{v}.n=u×v.

We use the formula derived above for the cross product:

nβƒ—=[u2v3βˆ’u3v2u3v1βˆ’u1v3u1v2βˆ’u2v1]=[1β‹…2βˆ’3β‹…43β‹…1βˆ’2β‹…22β‹…4βˆ’1β‹…1]=[2βˆ’123βˆ’48βˆ’1]=[βˆ’10βˆ’17].\begin{align*} \vec{n} &= \begin{bmatrix} u_2 v_3 - u_3 v_2 \\ u_3 v_1 - u_1 v_3 \\ u_1 v_2 - u_2 v_1 \end{bmatrix} \\ &= \begin{bmatrix} 1 \cdot 2 - 3 \cdot 4 \\ 3 \cdot 1 - 2 \cdot 2 \\ 2 \cdot 4 - 1 \cdot 1 \end{bmatrix} \\ &= \begin{bmatrix} 2 - 12 \\ 3 - 4 \\ 8 - 1 \end{bmatrix} \\ &= \begin{bmatrix} -10 \\ -1 \\ 7 \end{bmatrix}. \end{align*}n​=​u2​v3β€‹βˆ’u3​v2​u3​v1β€‹βˆ’u1​v3​u1​v2β€‹βˆ’u2​v1​​​=​1β‹…2βˆ’3β‹…43β‹…1βˆ’2β‹…22β‹…4βˆ’1β‹…1​​=​2βˆ’123βˆ’48βˆ’1​​=β€‹βˆ’10βˆ’17​​.​

We can now say that

nβƒ—βŠ₯uβƒ—,nβƒ—βŠ₯vβƒ—.\vec{n} \perp \vec{u}, \quad \vec{n} \perp \vec{v}.nβŠ₯u,nβŠ₯v.

We can even check this.

For u⃗\vec{u}u:

0=nβƒ—β‹…uβƒ—=[βˆ’10βˆ’17]β‹…[213]=(βˆ’10)β‹…2+(βˆ’1)β‹…1+7β‹…3=βˆ’20βˆ’1+21=0.\begin{align*} 0 &= \vec{n} \cdot \vec{u} \\ &= \begin{bmatrix} -10 \\ -1 \\ 7 \end{bmatrix} \cdot \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix} \\ &= (-10) \cdot 2 + (-1) \cdot 1 + 7 \cdot 3 \\ &= -20 - 1 + 21 \\ &= 0. \end{align*}0​=nβ‹…u=β€‹βˆ’10βˆ’17​​⋅​213​​=(βˆ’10)β‹…2+(βˆ’1)β‹…1+7β‹…3=βˆ’20βˆ’1+21=0.​

Therefore, nβƒ—βŠ₯uβƒ—\vec{n} \perp \vec{u}nβŠ₯u.

For v⃗\vec{v}v:

0=nβƒ—β‹…vβƒ—=[βˆ’10βˆ’17]β‹…[142]=(βˆ’10)β‹…1+(βˆ’1)β‹…4+7β‹…2=βˆ’10βˆ’4+14=0.\begin{align*} 0 &= \vec{n} \cdot \vec{v} \\ &= \begin{bmatrix} -10 \\ -1 \\ 7 \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 4 \\ 2 \end{bmatrix} \\ &= (-10) \cdot 1 + (-1) \cdot 4 + 7 \cdot 2 \\ &= -10 -4 + 14 \\ &= 0. \end{align*}0​=nβ‹…v=β€‹βˆ’10βˆ’17​​⋅​142​​=(βˆ’10)β‹…1+(βˆ’1)β‹…4+7β‹…2=βˆ’10βˆ’4+14=0.​

Therefore, nβƒ—βŠ₯vβƒ—\vec{n} \perp \vec{v}nβŠ₯v.

One Final Remark

Keep in mind that the cross product in this form only exists in three dimensions. There are some more advanced cases in higher dimensions, but that is beyond the scope of this lesson.

Previous
Planes
Next
Gaussian Elimination - Introduction
This website does not collect personal data, does not use cookies, and does not perform any tracking.