#Where did this step come from (linear algebra/vector calculus)

93 messages · Page 1 of 1 (latest)

astral flax
#

This is talking about the fact that you can take z = xy, and use matrices and quadratic forms to "rotate" the coordinate system by an angle, theta, such that z = xy takes the form of another function that makes sense for later steps. But where in the world did the "Well, if we rotate coordinates:" portion come from? That went from 0 to 100 so fast for me. Can someone explain the structure of the expression?

woven rootBOT
#
  1. Wait patiently for a helper to come along.
  2. Once someone helps you, say thank you and close the thread with:
+close
  1. Feel free to nominate the person for helper of the week in #helper-nominations
  2. Do not ping the mods, unless someone is breaking the rules.
  3. If you're happy with the help you got here, and the server overall, you can contribute financially as well:
meager crater
#

$\begin{pmatrix}
cos(\theta) & -sin(\theta) \
sin(\theta) & cos(\theta) \
\end{pmatrix}$ is known as the 2d rotation matrix.

haughty iglooBOT
meager crater
#

That means when you compute this matrix, you'll get your basis rotated.

meager crater
#

with $-sin(\theta) = cos(\theta + \pi/2)$ and $cos(\theta) = sin(\theta + \pi/2)$

haughty iglooBOT
astral flax
#

Yeah, I understand how that matrix causes a rotation, but I don't understand how they used that fact to convert the matrix form of z = xy to a rotated coordinate form

#

The substitution makes no sense to me

#

Why are the two rotation matrices different here?

meager crater
#

Cause you have $\begin{pmatrix}
x & y
\end{pmatrix}$ and $\begin{pmatrix}
x \
y
\end{pmatrix}$ vectors

haughty iglooBOT
astral flax
#

Okay, that's a step closer to what's confusing me. What's the difference?

#

How do the multiplications work out differently?

#

I'm only used to a matrix being multiplied by a column vector, I don't know what to do with a row vector

meager crater
#

Because there are some multiplication rules about the size of your matrices

#

You can't multiply $\begin{pmatrix}
x \
y
\end{pmatrix} \begin{pmatrix}
cos(\theta) & -sin(\theta) \
sin(\theta) & cos(\theta)
\end{pmatrix}$

haughty iglooBOT
meager crater
#

So we write $\begin{pmatrix}
x & y
\end{pmatrix} \begin{pmatrix}
cos(\theta) & -sin(\theta) \
sin(\theta) & cos(\theta)
\end{pmatrix}$

haughty iglooBOT
meager crater
#

Now does $\begin{pmatrix}
x & y
\end{pmatrix}$ and $\begin{pmatrix}
x \
y
\end{pmatrix}$ represent the same vector? yes

haughty iglooBOT
astral flax
#

Making a little more sense. Why did they write (x' y') in the substitution? I thought x' and y' were the coordinates that were rotated or something?

#

Where I'm getting stuck is thinking that you can somehow show that the substitution equals the original expression with x and y

#

Am I misinterpreting something

meager crater
#

Okay, you have to think about what represents the matrix and what represents the vector

#

A matrix = your basis

#

A vector = just a vector

#

When you multiply a vector by a matrix (to the left), it means you represent your vector in another basis.

astral flax
#

So then x' and y' simply symbolize that they're altered by the rotation?

meager crater
#

Somehow

astral flax
#

Because the way I'm trying to make sense of the expression is like, how did $\begin{pmatrix}
x & y
\end{pmatrix}$ become $\begin{pmatrix}
x' & y'
\end{pmatrix}$ $\begin{pmatrix}
cos(\theta) & -sin(\theta)
sin(\theta) & cos(\theta)
\end{pmatrix}$

haughty iglooBOT
astral flax
#

Sorry for the bad formatting

meager crater
#

Np

astral flax
#

And similarly for the column (x y) becoming the piece to the right

#

Because what I'm seeing is "before equals after", but...how?

meager crater
#

Because $\begin{pmatrix}
cos(\theta) & -sin(\theta) \
sin(\theta) & cos(\theta)
\end{pmatrix} \begin{pmatrix}
x \
y
\end{pmatrix} = \begin{pmatrix}
x' \
y'
\end{pmatrix}$

haughty iglooBOT
astral flax
#

Alright, now how does this work out with the weird row vector multiplication rule you mentioned before

#

Because if that can explain the correspondence, that may help

#

Also, wait a second. To get a valid substitution for the column (x y), wouldn't you need to multiply both sides by the inverse of that rotation matrix? To isolate the column (x y)

#

Wait a second...is this matrix the inverse of the rotation matrix?

meager crater
#

It's not a problem, the rotation matrix is orthogonal, so $Q^{-1} = Q^T$

haughty iglooBOT
astral flax
#

WHAT

#

That's amazing, why didn't I think of that

#

Of course it's the inverse

#

Oh my gosh, wait, so let me make sure I'm understanding this

#

Still a bit foggy. This basically is a direct substitution using the definition of those rotated coordinates. For the first one, the row (x y), it just has to be in that order because row count of the right matrix must equal the column count of the left matrix

#

And the column (x y) on the end becomes what it does with just an inverse

#

Because rotation times inverse rotation just takes you back

#

Okay yeah this is much smoother now

meager crater
#

Now you can detail those substitutions to be sure you understand (that's not difficult)

haughty iglooBOT
astral flax
#

Plugging in x' and y' will give me values of z all the same, right? It's just now it's taking into account the rotation of the coordinate system with the extra variable, theta

#

I think I finally understand where it came from a bit better

#

How does the entire expression become a value in the end, by the way? Is $\begin{pmatrix}
x & y
\end{pmatrix} \begin{pmatrix}
x \ y
\end{pmatrix}$ syntactically a dot product somehow?

#

How do I make it a column :/

haughty iglooBOT
astral flax
#

There, double backslash

#

Had a feeling the escape was wrong. But yeah, is it?

meager crater
astral flax
#

Can you "kinda" see it as matrix multiplication that results in a 1x1 matrix?

#

Like does that even make sense

meager crater
#

Sure

astral flax
#

Oh

meager crater
#

I thought this too.

#

That's maybe an abuse of notation

#

But in fact, a 1x1 matrix could be interpreted as a scalar, in the same way as a 1xn matrix could be interpreted as a vector.

#

That's what I think

#

Anyway, you can see this as the "definition of a dot product"

astral flax
#

I'm so not used to this abstract stuff

#

Things like this make me question what the definition of things even are anymore

meager crater
#

Beginning the linear algebra series with the basics.
Help fund future projects: https://www.patreon.com/3blue1brown
An equally valuable form of support is to simply share some of the videos.
Home page: https://www.3blue1brown.com/

Correction: 6:52, the screen should show [x1, y1] + [x2, y2] = [x1+x2, y1+y2]

Full series: http://3b1b.co/eola

Fu...

▶ Play video
#

So take a look at this

#

It saved me on my math courses

astral flax
#

I actually did watch this a while ago

#

Which is why I'm thinking back at the "just a collection of numbers" outlook he mentioned

meager crater
#

Yes, but you have all the series on linear algebra, not just this video

#

How do you translate back and forth between coordinate systems that use different basis vectors?
Help fund future projects: https://www.patreon.com/3blue1brown
An equally valuable form of support is to simply share some of the videos.
Home page: https://www.3blue1brown.com/

Future series like this are funded by the community, through Patreon, w...

▶ Play video
#

Multiply a vector by a matrix = change basis

astral flax
#

@meager crater For context, this was all inside an explanation for deriving the Hessian matrix from quadratic approximations in several variables

meager crater
#

Okay, I didn't do this before. That's why I don't understand the end, with the saddle. But sounds interesting.

#

Hope I helped you to understand this linear algebra part.

astral flax
keen flareBOT
#

@astral flax has given 1 rep to @meager crater

astral flax
#

+close