#linear-algebra

2 messages ยท Page 122 of 1

old flame
#

Same case for kernel and image I guess right

spiral star
#

yea

#

im(f) just applies to any function

#

and ker(f) is defined for homomorphisms

#

(and can be generalized in category theory)

old flame
#

Damn, it extends quite far then

spiral star
#

its just nice to have the same terminology for different things

#

especially when those things overlap

#

linear algebra will overlap a bit with group theory once you get to determinants

#

which is probably very late since you read axler lol

#

with his irrational fear of determinants

old flame
#

Yeah that's true LOL

#

Determinants is the last chapter

#

Oh well I guess I just have to wait a while

#

So when it overlaps things gets more interesting ?

spiral star
#

uh

#

idk

#

determinants are super useful for doing all the eigenvalue theory stuff

#

characterizing similarity

#

but yea...

#

i dont really remember how axler does all that

gray dust
#

a tiny addition, an isomorphism is a bijective homomorphism, note domain/codomain need not be the same set (tack on domain=codomain & you got a bijective endomorphism hence an automorphism). and related is that in the context of linalg it's a somewhat big thing that same dim vector spaces (over same field) are isomorphic, ie there exists an isomorphism between em

old flame
#

Oh I haven't reached there yet, sounds exciting ๐Ÿ‘

#

Do these notation simplify proofs ? Or when do we use them ? As I haven't encountered a problem requiring them yet

spiral star
#

@gray dust is it just me or does your name evolve over time lmao

gray dust
#

very slowly if at all, rokabe was maybe 6mo ago

spiral star
#

so it is just me

#

lol

gray dust
#

i'll change it more often, just for you vvWink

spiral star
#

oh noes

gray dust
#

too late vvDevil

spiral star
gray dust
#

Do these notation simplify proofs ? Or when do we use them ? As I haven't encountered a problem requiring them yet
fancy speak doesn't affect how good your proof writing is, this is just the vocab flow has accrued over time having experience beyond linalg

spiral star
#

(my LA prof actually did topological algebra)

#

but yea, it's just notation

#

i think it's good to learn the different notation

#

i dont see where using the more general notation would make anything easier in LA

#

only very minor things

#

truth is, im just too lazy to change my ways

gray dust
#

not that you need to

spiral star
#

i will stick to what i learned in universal algebra and category theory :p

zinc copper
#

for a set V to be a vector space, must the additive inverse of an element v be unique or can there be multiple?

marble lance
#

@zinc copper It is not an axiom that it must be, but it follows from the other axioms. So yes, "there can be only one"

zinc copper
#

how does it follow?

spiral star
#

gwoup theowy

zinc copper
#

ah anyways ive figure out why my example cant be a vector space, but now im curious

marble lance
#

Suppose y and z are both additive inverses of x

#

Can you show that y = z?

zinc copper
#

x+y = 0 = x+z. subtract x to get y =-x = z

#

oh nvm

#

i cant just subtract

#

hmm

marble lance
#

Yeah, start with x + y = 0, then z + (x + y) = z

zinc copper
#

right

#

and with associativity

marble lance
#

Yes

zinc copper
#

(z+x)+y = y

#

so z = y

#

aight

#

thanks

marble lance
#

Np

errant wyvern
#

Hi, when is there some dedicated way to finding all the invariant subspaces of a linear opertaor give by its matrix?

rose coral
#

Ok so I'm a bit rusty, but I believe what you do is find the Jordan Canonical Form

#

Which is like a generalization of finding eigenvalues

#

You should always be able to find the Jordan Canonical Form if you are willing to deal with complex numbers

#

Wait, actually I don't think you need to go through the whole process if you just want the invariant subspaces

#

Are you asking out of curiosity or because you want to know the algorithm for finding the invariant subspaces?

errant wyvern
#

Well i have these exercieses on my exams which requier that from me, was wandering if there is an algorithm for it or if its nuanced?

#

So yeah if theres an algorithm that would help out immensly

rose coral
#

Ok so just finding the invariant subspaces isn't tooo terrible

#

Do you know of the characteristic polynomial?

errant wyvern
#

I'm generaly given the matrix so i can find it if thats what you are asking?

rose coral
#

I'm just not familiar with what people are taught so I wanted to know if you knew of it

#

So first thing you need to do it factor the characteristic polynomial

#

As you might know, the roots tell you the eigenvalues

#

Well, for the invariant subspaces you also care about the multiplicity of the roots

errant wyvern
#

could i do the same with det(a-xI) to find the eigenvalues and its multiplicity?

rose coral
#

Yeah

#

So say that the char poly is $\det(A - xI) = (x - 1)(x + 2)^2(x^2 + 1)$

stoic pythonBOT
rose coral
#

Then for each factor you get an invariant subspace

#

For 1 you get the eigenspace $\ker(A - I)$

stoic pythonBOT
rose coral
#

Maybe you use nullspace instead of kernel

#

For the factor $(x + 2)^2$ you get what is called a generalized eigenspace, in this case corresponding to the eigenvalue $2$

stoic pythonBOT
rose coral
#

Which is $\ker\Big((A + 2I)^2\Big)$

stoic pythonBOT
rose coral
#

And finally you get one for $x^2 + 1$, which is $\ker(A^2 + I)$

stoic pythonBOT
errant wyvern
#

Maybe you use nullspace instead of kernel
@rose coral myb im lost in translation, but doesnt in english litterature kernel and nullspace mean the same thing?

rose coral
#

Yeah they do, just wanted to include both terms just in case

errant wyvern
#

allright, also in all of theese "A" reperesents the matrix of the linear operator?

#

just checking for confidence sake

rose coral
#

Yup, and you find the kernel by row reduction or whatever you prefer

#

And so the space decomposes as $\bR^5 = \ker(A - I) \oplus \ker(A + 2)^2 \oplus \ker(A^2 + I)$

stoic pythonBOT
rose coral
#

Where each one is an invariant subspace

#

It's also important to note that the invariant subspace corresponding to some $(x - \lambda)^n$ will be $n$-dimensional

stoic pythonBOT
rose coral
#

And that's it

#

Well

#

Actually each $\ker(A - \lambda)^n$ might have smaller invariant subspaces in it

stoic pythonBOT
rose coral
#

And the sum of any invariant subspaces is again invariant

errant wyvern
#

allright so if i have like this example

#

this would lead me to belive that invariant subspace is 3dimensional, based on eigenvalue 1

#

i miswrote on the pic, eigenvalue is obviously 1

rose coral
#

Sorry we're talking about the $\begin{bmatrix}1 & -1 & 0 \ 1 & 1 & 0 \ 0 & 0 & 0\end{bmatrix}$?

stoic pythonBOT
errant wyvern
#

yes, in the example we can see the linear opertator by being given its efect on the vectors {x,y,z}, we extrapolate the matrix which then eqiuals to what you have written here

The_Vman:
@stoic python

#

and then we find the eigenvalue, which in this case is 1, of multiplicity 3, correct?

rose coral
#

I don't think so, you should get an eigenvalue of 0 with multiplicity 1

#

Not sure about the other two factors

errant wyvern
#

yes

#

i made a mistake my bad sorry for wasting time

#

im hurrying and making stupid mistakes

rose coral
#

No worries, happens to everyone

#

Ok so in this case it looks like the characteristic polynomial is, up to a sign, $x((x - 1)^2 + 1)$

stoic pythonBOT
rose coral
#

Where the quadratic doesn't have real roots

#

Oh btw if you have the matrix in blocks like this one, you can calculate the characteristic polynomial for each block and then multiply those together

#

So here the (x - 1)^2 + 1 comes from the top left, 2x2 block

#

But in terms of the invariant subspaces, here there isn't much to compute as the blocks give the subspaces. The only thing that could potentially happen is that the 2x2 block broke down further into invariant subspaces

#

But the polynomial doesn't have real roots (it is irreducible), so it doesn't

errant wyvern
#

allright so what do i do here to find invariant subspaces?

rose coral
#

You could go through finding the kernels of corresponding to the factors

#

But the factor corresponding to 0, which corresponds to the bottom right 1x1 block, will have invariant subspace spanned by (0 0 1), the kernel of the original map

#

And the 2x2 block doesn't further break up into invariant subspaces, so its invariant subspace is simply given by the span of (1 0 0) and (0 1 0)

errant wyvern
#

i see

#

thank you

#

really appreciated the help

rose coral
#

No problem

errant wyvern
#

i also now noticed a patern that my professor tends to give on this sort of exercise

#

its either a projection operator or something of the sort in the example above

rose coral
#

Oh cool, that makes it easier

errant wyvern
#

yeah, but i really appreciate your help, it may not help too much here but it definitly will in the future

rose coral
#

Anytime

errant wyvern
#

here is another example of the exercise, hopefully i did it well here

#

here is a linear operator of projection in R^3 to R^3, where it maps {x,y,z}^t to {0,y,z}^t. Extract its matrix, then found eigenvalues. Eigenvalues are 0 and 1, 1 having multiplictiy of 2. Found kernel of (P-1 I) and it is spanned by vectors {0,1,0} and {0,0,1}

rose coral
#

Yup that works

#

Now here the invariant subspace spanned by {0, 1, 0} and {0, 0, 1} decomposes into the 1d subspaces

#

So in this case the subspace spanned by {0, 1, 0} and another spanned by {0, 0, 1}

errant wyvern
#

I see

rose coral
#

It could have been that it doesn't decompose

errant wyvern
#

yeah but here it does i just skimmed past it

#

thanks for pointing it out

rose coral
#

No problem

#

Also if the matrix is diagonal, it fully decomposes into the 1d subspaces given by the standard basis vectors

#

And as an example $\begin{bmatrix}2 & 0 & 0 \ 0 & 1 & 0 \ 0 & 1 & 1\end{bmatrix}$

stoic pythonBOT
rose coral
#

has it so that the generalized eigenspace corresponding to 1 doesn't decompose, because of this 1 off the diagonal in the bottom left 2x2 block

#

Here the invariant subspace isn't that hard to see, but if the matrix wasn't this nice, you would have to compute $\ker(A - I)^2$ not just $\ker(A - I)$ to get the full 2d invariant subspace

stoic pythonBOT
errant wyvern
#

I see

#

Will be on the lookout for that in the examples im given

#

Another question, if i have a list of matrices with the task of checking which ones are simmilar, all i need to do is find their eigenvalues right? And if i have the same, but instead of checking it they are simmilar i need to check if they are equivalent matrices all i need to do is check their ranks?

spiral star
#

@errant wyvern yes, for equivalence you only have to compare their ranks.
and no, for similarity its not enough to find eigenvalues.

#

if two matrices are similar, they have the same eigenvalues. but not all matrices with the same eigenvalues are similar. you need a stronger condition

#

so if they have different eigenvalues, you immediately know they cant be similar

#

but if they have the same, it doesnt tell you anything

#

the usual trick for similarity is to show that both matrices are similar to the same normal form

#

for example, if both matrices are similar to the same diagonal matrix, then they are similar

#

and if they are not diagonalizable, then you can compare their jordan normal forms

errant wyvern
#

I see

#

Allright thanks

spiral star
#

i guess if you want some steps for checking whether matrices A and B are similar: 1) find their characteristic polynomials. if they are different, then A and B cant be similar. 2) check geometric multiplicities. if A and B are similar to the same diagonal matrix, they are similar. 3) if neither matrix is similar to a diagonal matrix, find their jordan normal forms and compare those

#

i hope you must never resort to finding the JNF lol

errant wyvern
#

yeah i see

#

finding the jnf is annoying and gruntwork but it aint hard

#

just would rather skip it lul

spiral star
#

yea xd

#

but comparing JNF will always tell you if they are similar

#

but best case scenario is you find your answer before you have to go through that

#

you can use a few facts about the characteristic polynomials as well

#

if you get distinct linear factors, like (x - a)(x - b)(x - c)... where a,b,c are different

#

then you have similarity to a diagonal matrix

#

and you dont have to take any extra steps

#

because then the geometric and algebraic multiplicities already match up

#

so for those you can read off the answer pretty much

#

basically, try to avoid unnecessary computation

rose coral
#

@glad current does this make sense?

#

$\begin{bmatrix} 1 & 2 & -3 \ 5 & 0 & 1\end{bmatrix} \begin{bmatrix} a \ b \ c \end{bmatrix} = a\begin{bmatrix} 1 \ 5\end{bmatrix} + b\begin{bmatrix} 2 \ 0\end{bmatrix} + c\begin{bmatrix} -3 \ 1\end{bmatrix}$

stoic pythonBOT
glad current
#

yeah

#

(that's how 3brown1blue explains it)

rose coral
#

Ok awesome

#

I think its the best way of remembering it

hexed mural
#

Question

#

can you parameterize a vector Space?

#

for a Basis vector and a coordinate vector?

half storm
#

What do you mean parametrize?

hexed mural
#

a line

#

the vector space

#

parametrize it

#

So for example

half storm
#

Can you parametrize a line in a vector space?

hexed mural
#

yes

half storm
#

If depends on what the vector space is.

hexed mural
#

This can be explained by example

half storm
#

Not all vector spaces are $\mathbb{R}^n$ n $\in \mathbb{N} \cup { 0 }$

stoic pythonBOT
hexed mural
#

@half storm

#

instead of typing this can I link the paper?

#

and we can discuss it?

#

it's probably easier

#

What I am trying to figure out is. How he parameterized the ellipsoid vector space

#

page 7-11

half storm
#

eh I'm not familiar with this. Might be better to ask someone else.

hexed mural
#

what section

half storm
#

<@&286206848099549185>

hexed mural
#

the question section?

#

alpha to theta

#

thanks god father John

half storm
#

Yea questions section. lol no problem.

little frigate
#

Is there a website I can use to calculate matrices based on a position like

#

say I have a formula like c_ij = i + j

#

I'd like to know if there's a website that can calculate this

quartz compass
#

whatcha mean calculate

#

like fill out the matrix that looks like that with those as entries?

little frigate
#

Yea

quartz compass
#

I'd use a good enough calculator or programming language like matlab or octave

little frigate
#

Dang

quartz compass
#

ti-nspire can make matrices that way for instance

little frigate
#

Alright thanks

olive kraken
#

anyone know how i can find the OG matrix from this

#

i have to figuure out if the determinant is 0

#

im not sure if there is a way to do that other than working backwards to find the matrix

#

oh wait i think nonsingular just means that it can be put into the RREF where theres a 1 for each row

quartz compass
#

one way is to write out a 2x2 matrix with entries a,b,c,d then plug in everything to X'=AX

surreal thistle
#

can component of a along b be a negative value?

#

nevermind i guess it can

gray dust
#

scalar projection, yes

olive kraken
#

im stuck on this

#

even for a 2x2 matrix i don't really know how to prove that without using numbers

#

let alone an nxn matrix

rose coral
#

What does it mean for lambda to be an eigenvalue of a matrix A?

olive kraken
#

it makes it a zero vector?

#

or something like that

rose coral
#

Maybe you are thinking of the matrix A - (lambda)*I

olive kraken
#

yea

rose coral
#

A scalar lambda is an eigenvalue of a matrix A if there exists a non-zero vector v such that Av = lambda * v

olive kraken
#

so the direction is preserved but the magnitude changes

rose coral
#

Pretty much, if lambda is 1 or -1 then the magnitude doesn't change

#

But yeah the direction is preserved

#

Ok so what would it mean for $\lambda^2$ to be an eigenvalue of $A^2$?

stoic pythonBOT
olive kraken
#

theres a non zero vector Av = ((lamda)^2)+v

#

?

rose coral
#

$A^2v = \lambda^2 v$, yeah

stoic pythonBOT
olive kraken
#

oh yea

rose coral
#

Ok so to prove the statement, you need to use the assumption that $\lambda$ is an eigenvalue of $A$ to find such a $v$ for $A^2$

stoic pythonBOT
rose coral
#

Right?

olive kraken
#

yes

#

i dont even know how to move foward from that though

rose coral
#

Ok so here's what my thought process is when I'm given a problem like this

#

First I understand what I need to do, I think we've done that part

#

Now I look at what I can use to prove the statement I want

#

So, I need to find a special vector v that relates to A^2. And since lambda is an eigenvalue of A, I'm given a special vector for A

#

My gut instinct is to see if the same vector works

#

I'll set it up

olive kraken
#

ok

rose coral
#

I'm given that $\lambda$ is an eigenvalue of $A$. Unravelling that definition, I'm given some non-zero vector $v$ such that $Av = \lambda v$

stoic pythonBOT
rose coral
#

Now I want to try out this vector with A^2, see if it works

#

How can I tell if it works?

olive kraken
#

i guess if it equals the lamda squared thing ?

rose coral
#

Yeah, I want to start out with $A^2v$ and see if I can turn that into $\lambda^2 v$

stoic pythonBOT
rose coral
#

So, I start with A^2v. I want to get some lambda stuff, so I use the assumption

#

A^2v just means apply A to v, and then apply A again

#

So $A^2v = A(Av)$

stoic pythonBOT
olive kraken
#

A is a matrix and so what is lambda again

rose coral
#

It's a scalar, so probably a real number

olive kraken
#

oh ok

rose coral
#

But the point is, now I can use my assumption that $Av = \lambda v$

stoic pythonBOT
rose coral
#

If I plug that in, I get $A^2v = A(Av) = A(\lambda v)$

stoic pythonBOT
rose coral
#

Do you think you can continue?

olive kraken
#

maybe

#

so then you apply the lamba to both sides?

rose coral
#

Not quite

#

I'm guessing you want to get another lambda so you have lambda^2

#

The idea is that the A already is like a lambda, when A acts on this vector its the same as scaling by lambda

olive kraken
#

ohh

rose coral
#

So you should be able to get the other factor of lambda from the A that is left in $A(\lambda v)$

stoic pythonBOT
olive kraken
#

A = lambda?

#

is Av and lambda v just multiplication?

rose coral
#

Yeah the A and lambda are multiplying the vector v

#

But the tricky thing is that A doesn't necessarily scale everything by lambda, only this specific v

#

(Well actually it should do the same thing to whole span of v)

#

Ok so the fact I wanted you to use was $A(\lambda v) = \lambda * Av$

stoic pythonBOT
rose coral
#

And then you can replace $Av$ again by $\lambda v$

stoic pythonBOT
rose coral
#

The idea is that whenever you have a matrix A, you can pull out scalars. So A(5x) = 5A(x)

#

Ok I hope that wasn't too confusing, its just how I think about doing proofs

olive kraken
#

i mean its a good explanation im just super unfamiliar with this stuff so its taking some work to digest but i think im following

rose coral
#

Ok I'm glad you think it was a good explanation/you were able to follow

#

What you should take away is that a matrix A does the same sort of thing to vectors in the same span

#

Which is captured by A(3x) = 3Ax

#

So if A rotates a vector v by 90 degrees, it also rotates 3v by 90 degrees. If it skews v onto the y axis, it also skews 9v onto the y axis (and also 0.2*v and 12v etc.)

olive kraken
#

ohh okay

rose coral
#

And if A scales v by lambda, it also scales 3v or 5v or lambda*v by lambda

#

So is scales the entire line spanned by v, by a factor of lambda

#

So this whole thing was saying, if A scales some line (say spanned by a vector v) by a factor of lambda, then applying A^2, meaning applying A twice, should be like scaling that line by lambda twice, meaning it scaling by lambda^2

#

Personally I think that the best way to understand linear algebra is geometrically

#

Have you watched 3Blue1Brown's essence of linear algebra on youtube?

olive kraken
#

no i need to watch that i havnt looked into the geometric aspect of linalg at all

#

but its super confusing as of now so that hopefully will help

rose coral
#

I would recommend it. It explains everything very visually and is a great way to build intuition, and understand what is going on

#

Other than that just keep asking questions

olive kraken
#

okay i will i hope i can understand this stuff eventually

#

as of now i literally have no idea why i do any of the operations that i do which sucks

#

also can i just send a summed up version of what we discussed to make sure i didnt make any errors?

rose coral
#

Yeah sure

olive kraken
rose coral
#

Yeah that looks good

#

When you write a proof though its useful to have words explaining what each step is

#

So you can start by something like "Since A has eigenvalue lambda there is a vector v such that (first equation in black)"

#

And then you can say stuff like "by (the equation in black) we can plug in lambda v for Av" ...

#

But it just takes practice

#

And btw if you find the videos confusing, or something you find something you've read/learnt in class confusing, just ask. People are also here to help with those types of questions

olive kraken
#

wow

#

thank you so much for the help

rose coral
#

Anytime

olive kraken
#

this honestly gives me confidence in my math skills, i was beginning to think that I was in my final days of math because i was getting so lost

#

but i will keep pushing and hopefully understand this stuff

rose coral
#

I believe in you

#

Yeah I would say the way linear algebra is usually taught isn't great

olive kraken
#

Thank goodness the internet is here to help lol

rose coral
#

Lol yeah its great

hexed mural
#

Hello I have question regarding this derivation

#

What do they mean by Orthonormal base for the plane how are these definitions derived? for the vectors axes

paper egret
#

my lin alg is incredibly rust

#

any1 got any starting points?

wintry steppe
#

a common technique for showing that some vector x has a certain representation with respect to a basis {u_1, ..., u_n} is to apply your inner product to both sides of x = sum x_i u_i

#

the question is worded a bit weirdly

#

but i gather from it that your inner product is just x^T y. try using this inner product along with the equation x = sum x_i u_i

paper egret
#

i wasnt too sure if x_i is an element of vector x

wintry steppe
#

x_i is a scalar here

paper egret
#

o

#

h

#

so its not

#

in the vector x

#

thats confusing

#

nice

wintry steppe
#

it's a bit deceptive since x is an element of R^n

#

so you'd be inclined to represent it in the standard basis

paper egret
#

damn shudve used a different letter instead of x_i then, maybe c_i woulda been better

wintry steppe
#

maybe

#

i like how it says the n-dimensional vector space as if R^n is the only one

paper egret
#

so we know that

x = c1u1+c2u2 + ... + cnun is true

#

set every c to 0, except c_i = 1

#

x = ciui

#

uh oof my proof is garbage

wintry steppe
#

you can't change the values of the c_i's

paper egret
#

shit

wintry steppe
#

if you're writing x = sum c_i u_i, then your goal is to show that c_k = x^T u_k for each k

paper egret
#

we know that there is a set of c_i's that make the vector x

#

uhh

#

hmm

wintry steppe
#

here's something super straightforward you can do: try subsituting your expression for x into x^T u_k

#

(which is equivalent to what i said at the start and probably less confusing)

paper egret
#

if i transpose x

#

from the definition

#

x = c1u1 + c2u2 + ... + cnun

#

transpose this

#

what would the right side look like?

wintry steppe
#

transpose is linear

#

that might help

paper egret
#

lemme think it thru a tad bit more

#

uhhh

wintry steppe
#

just keep in mind your c_1, ..., c_n are scalars and u_1, ..., u_n are elements of R^n

paper egret
#

so the transpose applies to all vectors

#

or my mistake

#

applies to each term

wintry steppe
#

mmhm

paper egret
#

xT = c1u1T + c2u2T + ... + cnunT

#

sorry for the crappy notation

wintry steppe
#

nah it's fine i get what you mean

#

that's correct

paper egret
#

if i multiply that by ui

#

i dont know what happens LMAO

#

xTu_i = (c1u1T + c2u2T + ... + cnunT)(u_i)

wintry steppe
#

you forgot the left side of the equation

#

that is important

#

;)

paper egret
#

that

wintry steppe
#

right

paper egret
#

but how does the right side

#

give c_i

#

h u h

wintry steppe
#

tell me what property {u_1, ..., u_n} satisfies

#

this is where it should come in

paper egret
#

its a basis

#

i never studied orthonormal

#

so maybe it might be that

wintry steppe
#

do you know what orthonormal means at least?

paper egret
#

lemme wikipedia real quick

#

oh it just means

#

the vectors are orthogonal to each other

gray dust
#

and?

paper egret
#

wait no

wintry steppe
#

hi roketto

paper egret
#

wait thats correct?

gray dust
#

there's more. hi tera

paper egret
#

all unit vectors

#

and orthogonal

#

o

#

that means any dot product between two vectors from the basis is equal to 0

#

but

#

i dont see how that applies here

wintry steppe
#

simplify (c1u1T + c2u2T + ... + cnunT)(u_i) some

paper egret
#

lol i dont know how

#

FUCK

#

WAIt

#

IM RETARDED

#

GImme a sec

#

distribution duh

#

oh

#

thank

#

you

#

so much

#

you furry god

wintry steppe
#

do you see the final result?

paper egret
#

yessir

#

uh wait real quick though

#

ui^T dot with ui is equal to 1 right?

wintry steppe
#

yes

#

why?

paper egret
#

uh idk

#

tbh

wintry steppe
#

orthonormal

#

the normal part means that any vector dot itself is 1

paper egret
#

o h

gray dust
#

hence unit norm

paper egret
#

damn so it was all in the orthonormal

#

yea

#

orthogonal + normal = orthonormal

#

i shudve paid attention to the orthonormal more

wintry steppe
#

slight nitpick: "u_i^T dot u_i" should just be "u_i dot u_i" or "u_i^T u_i"

paper egret
#

fuck me

#

thank you again

#

learned something new

#

and a nice lin alg review ig

gray dust
#

tera strikes again brillianceClap

wintry steppe
#

now go do 20 problems of the exact same flavor

#

jk

#

you can get a slightly more general expression for x with respect to an orthogonal basis by following the exact same method

#

which is sometimes useful

#

e.g. in the proof of gram-schmidt iirc

#

fun fact that might be worth keeping in mind

pastel kettle
#

Is this where also i can ask questions?

gray dust
#

if linear algebra related

pastel kettle
#

I have no idea what inner product im supposed to use and dunno what im supposed to doooo

rose coral
#

Ok so they've given you the norm associated with an inner product

#

And you want to know what the formula for the inner product is so that you can find the space perpendicular to E

#

Right?

pastel kettle
#

Yes

#

And also further

#

And projection as well

rose coral
#

Yeah

pastel kettle
#

I feel like im losing hair bc of this

rose coral
#

Ok so Theorem 2.1.13 lets you get the formula for the inner product from the norm

#

So I would plug in the equation you're given for the norm to get what the inner product is

pastel kettle
#

Yes so instead of y do i put x? So it can be $llx+xll$

stoic pythonBOT
rose coral
#

Well I think you want to know what <x, y> is

#

If you replace y by x then you'll just get the norm back

#

I think you need to know what the inner product between two arbitrary vectors is

pastel kettle
#

I meanim confused cuz from the question y is not given

#

Yes very true

rose coral
#

Oh ok

pastel kettle
#

Thats why im stuck from beginning

rose coral
#

So there is this inner product <x, y> that you are not given

pastel kettle
#

They not given

rose coral
#

Yeah

#

But you can find what it is

#

In Theorem 2.1.13 the x and y are just variables

pastel kettle
#

Oh is it $(1,2)^T$

rose coral
#

No

stoic pythonBOT
rose coral
#

You don't want to compute the inner product of a specific pair of vectors just yet

#

You just want to know the formula

pastel kettle
#

Oh yes

#

Truee

#

So far i know $llxll^2 = <x,x>$

stoic pythonBOT
pastel kettle
#

Am i right?

rose coral
#

Yes

#

But you also know that <x, y> = ||x + y||/4 - ||x - y||/4

#

If x and y are any two vectors

#

So use the formula you are given for the norm to compute ||x + y|| and ||x - y||

pastel kettle
#

So do i need to compute <1,2>?

rose coral
#

No

pastel kettle
#

Ugh

#

Just with letters then?

rose coral
#

Also <1, 2> doesn't make too much sense because you need to input vectors into < , >

#

Yeah with letters

pastel kettle
#

So there, $x = x_1$ and $y=x_2$?

stoic pythonBOT
rose coral
#

No

pastel kettle
#

Oh yeah bold x is vector

#

Y= (y1,y2)

rose coral
#

So you'll have two vectors x and y, and you'll get a formula for <x, y> in terms of x1, x2, y1, y2

pastel kettle
#

Yes

rose coral
#

Yeah exactly

pastel kettle
#

So i need to right down the root thing as in terms of x and y

rose coral
#

Yeah

pastel kettle
#

$(x_1 - x_2)^2 + 2(x_2)^2 + (y_1 -y_2)^2 + 2(y_2)^2$

stoic pythonBOT
pastel kettle
#

This??

rose coral
#

Not exactly

pastel kettle
#

Times 1/4

rose coral
#

That would be ||x||^2 + ||y||^2

#

You want to look at ||x + y||, so in the root formula you'll get something like $\sqrt{\Big((x_1 + y_1 )- (x_2 + y_2)\Big)^2 + 2(x_2 + y_2)^2}$

pastel kettle
#

Ohh

#

And we can also change + to minus

rose coral
#

You want to look at $||x + y||$, so in the root formula you'll get something like $\sqrt{\Big((x_1 + y_1 )- (x_2 + y_2)\Big)^2 + 2(x_2 + y_2)^2}$

stoic pythonBOT
rose coral
#

Yeah for the other term you'll have -y1 and -y2 instead of the y1 and y2

#

But the root goes away like you wrote above

pastel kettle
#

And we times 1/4

rose coral
#

Yes

pastel kettle
#

So if we do that we get <x,y>

rose coral
#

Yeah that gives <x, y>

pastel kettle
#

Then we move to Projection formula?

rose coral
#

Yeah, you look at the linear map which is the projection

#

I would hope that the formula for <x, y> simplifies some amount

pastel kettle
#

I am writing down

#

Waitt

#

Oh no

#

Made mistake

rose coral
#

I think you are missing some brackets

pastel kettle
rose coral
#

Yeah that looks good

pastel kettle
#

I will try to substitute them to A B c d

rose coral
#

Be careful, you got rid of some minus signs

pastel kettle
#

Is it correct??

#

Ohh

#

The second term

#

Last term

rose coral
#

You should have (...)^2 - (...)^2 + 2(...)^2 - 2(...)^2

#

Yeah

pastel kettle
#

Shall i subsitute

rose coral
#

I think it continues to simplify

pastel kettle
#

Oh with squared term?

rose coral
#

Yeah

pastel kettle
#

Hmm

#

Let me think

rose coral
#

I think you should maybe deal with the terms in pairs instead of substituting for them

pastel kettle
#

Hmm

rose coral
#

For example, the last two terms simplify to $8x_2y_2$

stoic pythonBOT
rose coral
#

There should also be a lot of canceling in the first two terms

pastel kettle
#

How did u get 8

#

Oh expand

rose coral
#

Yeah

#

Every other term in those last two should cancel

pastel kettle
#

Shall i just expand all

hexed mural
#

Is anyone familiar with Linear Combination of Vector Spaces?

pastel kettle
#

(X1+y1)^2 -2(..)

rose coral
#

Yeah I think you should expand it all

#

Is anyone familiar with Linear Combination of Vector Spaces?
@hexed mural Sorry we are still using this chat, but you can ask your question in one of the other chats and I'll help you as soon as I can

hexed mural
#

Sounds good

#

I'll wait

rose coral
#

Or someone else will help you

#

๐Ÿ‘

hexed mural
#

it's cool I've been kinda waiting all day for someone with some familiarity

pastel kettle
#

So just open all brackets

rose coral
#

Yeah I think so

pastel kettle
#

Damn give me a sec

rose coral
#

It looks like the majority of the terms will cancel

#

it's cool I've been kinda waiting all day for someone with some familiarity
@hexed mural If you ask your question in #help-5 I possibly help you in between helping im_molee

hexed mural
#

No worries I can wait

rose coral
#

Ok

pastel kettle
rose coral
#

You should have some minus signs

#

I think you forgot that the second term had minus signs

pastel kettle
#

Yeah its kinda cancelling out

#

-2 there!

rose coral
#

Yes but the $x_1^2$ should cancel

stoic pythonBOT
pastel kettle
#

Hmm i dont see posibility hmm

#

Ugh

#

Oh wait

rose coral
#

Ok so on the second to last line

pastel kettle
#

Right??

rose coral
#

Where you were going to substitute c and d

#

in front there should have been a minus

pastel kettle
#

Yess boss

rose coral
#

That should let you cancel the $x_1^2$ at some point

stoic pythonBOT
rose coral
#

In the end all of the terms should be mixed like the $8x_2y_2$, nothing squared

stoic pythonBOT
pastel kettle
#

Okay still doing itt

rose coral
#

Cool

pastel kettle
#

I got $2x_2y_2$

stoic pythonBOT
pastel kettle
#

After times 1/4

rose coral
#

Yeah that's good

pastel kettle
#

$<x,y> = 2x_2y_2$

stoic pythonBOT
rose coral
#

Wait you didn't get any other terms?

pastel kettle
#

No i didnt

#

So i calculated is (1)

rose coral
#

Ok, I got $<x, y> = x_1y_1 - x_1y_2 - x_2y_1 + 3x_2y_2$

stoic pythonBOT
rose coral
#

Yeah, also using (1)

pastel kettle
#

Last 3 lines

rose coral
#

Wait you got exactly the same thing I did

pastel kettle
#

Lol

rose coral
#

Lol

#

You just forgot them after dividing by 4

#

Anyways

pastel kettle
#

Hmm?

#

Oh

#

Wait no

#

Oh i see

rose coral
#

The terms $\frac{1}{4}(4x_1y_1 - 4x_1y_2 + \cdots)$ you wrote down were correct

stoic pythonBOT
pastel kettle
#

I got confused with the 1 and 2

#

And cancelled out

rose coral
#

Ah cool ok

#

So you get $<x, y> = x_1y_1 - x_1y_2 - x_2y_1 + 3x_2y_2$

stoic pythonBOT
pastel kettle
#

Yess

rose coral
#

Anyways, now we can compute $P_E$

stoic pythonBOT
pastel kettle
#

So what we got is the top part of fraction

rose coral
#

Yeah now we'll plug in values

#

So $P_E$ is a linear map, and we need to find the matrix associated with it

stoic pythonBOT
rose coral
#

Do you know how to do that?

pastel kettle
#

Wait let me try

#

Is our xj

#

1,2

rose coral
#

Yes

#

We only have one vector

pastel kettle
rose coral
#

Well actually we need to make sure (1, 2) has norm 1

pastel kettle
rose coral
#

That's almost right

pastel kettle
#

Can u see

rose coral
#

Sorry, I got confused with the norm 1 thing

pastel kettle
rose coral
#

Yeah, but now there is only one variable

#

Ok, first for the denominator you got 5? I got 9

pastel kettle
#

(1,2) so 1+5

#

1+4

rose coral
#

But we are not using that norm

pastel kettle
#

Ohhh

#

Yes

#

Ur right

#

1/9

rose coral
#

Awesome, and then on the numerator we have $<x, (1, 2)^T>$

stoic pythonBOT
rose coral
#

So we use $y_1 = 1$ and $y_2 = 2$ in the formula we found

stoic pythonBOT
pastel kettle
#

What do you mean by we have nummerator of that

rose coral
#

Because the expression is $\frac{<x, x_j>}{||x_j||^2}x_j$ right?

stoic pythonBOT
pastel kettle
#

Oh yes

#

Oh so yes y1 and y2 will be 1 and 2

rose coral
#

Which simplifies to $\frac{1}{9}\begin{bmatrix}-x_1 + 5x_2 \ -2x_1 + 10x_2\end{bmatrix}$

stoic pythonBOT
pastel kettle
#

Oh fuck am i dumb why didnt i simplify

rose coral
#

It's ok

pastel kettle
#

So what does this tell us? The Pex = to that

rose coral
#

Yes

#

So what is the matrix associated with $P_E$?

stoic pythonBOT
pastel kettle
#

It gives me (-1,5)^t

#

Hmm confusing

#

1,2?

rose coral
#

You are looking for a, b, c, d so that $\begin{bmatrix}a & b \ c & d\end{bmatrix}\begin{bmatrix}x_1 \ x_2\end{bmatrix}$

stoic pythonBOT
rose coral
#

is Pex

pastel kettle
#

Oh can u do voice channel?

#

If u dont mind??

#

I think last bit is most confusing

rose coral
#

Sure give me a second

pastel kettle
#

Aite

#

Do u hear me haha

rose coral
#

Yes, let me check my settings

pastel kettle
#

Aite

rose coral
#

This is $\frac{1}{9}\begin{bmatrix}-1 & 5 \ -2 & 10\end{bmatrix}\begin{bmatrix}x_1 \ x_2\end{bmatrix} = \begin{bmatrix}-1/9 & 5/9 \ -2/9 & 10/9\end{bmatrix}\mathbf{x}$

stoic pythonBOT
pastel kettle
native rampart
#

Just find the inner product and check

rose coral
#

$\begin{bmatrix}-1/9 & 5/9 \ -2/9 & 10/9\end{bmatrix}$

stoic pythonBOT
rose coral
#

\begin{bmatrix}1 & -5 \ 2 & -10\end{bmatrix}

stoic pythonBOT
rose coral
#

$\begin{bmatrix}1 & -5 \ 0 & 0\end{bmatrix}$

stoic pythonBOT
rose coral
#

$\begin{bmatrix}1 & -5 \ 0 & 0\end{bmatrix}\begin{bmatrix}x_1 \ x_2\end{bmatrix} = \begin{bmatrix}0 \ 0\end{bmatrix}$

stoic pythonBOT
rose coral
#

$\begin{bmatrix}x_1 - 5x_2 \ 0 \end{bmatrix} = \begin{bmatrix}0 \ 0\end{bmatrix}$

stoic pythonBOT
pastel kettle
rose coral
#

So $x_1 = 5$ and $x_2=1$ works

stoic pythonBOT
pastel kettle
#

Thabk u so muchhh

rose coral
#

No problem!

#

@hexed mural Hi, I finished helping out im_molee if you want to ask your question now

hexed mural
#

alright I hope it's not something out your expertise, I've spent some time reading and brushing up

#

The question is as follows

rose coral
#

Ok I hope I can answer it too

hexed mural
#

So I hope it's not a bother

#

in this document page 7-11

#

What I am interested in his how he derives a Vector Space as a Linear Combination

#

for the ellipsoid

rose coral
#

Ok

hexed mural
#

then if if we have time I was also wondering how he parameterizes it

#

along the velocity vector

rose coral
#

Ok I'm kinda getting the ellipsoid thing

hexed mural
#

what I think

#

is he does a linear combination

#

of the Radius vector

#

(1,1,1)

#

and (x,y,z)

#

then creates that matrix

#

CBM

#

which he uses to convert location velocity

#

then parameterizes it

#

that's what I understand but the math is abit above me

rose coral
#

Ok so personally I believe the "radius vector" doesn't make much sense

#

But I think I know what he means

hexed mural
#

that's what I thought too

#

LOL

#

he's implying that

rose coral
#

Really you want a set of three vectors to define the ellipsoid

hexed mural
#

the (x,y,z) vector is (1,1,1) in elipse space

#

I think that's what he's saying

rose coral
#

Well more than that I think

#

He's saying that if you take the unit sphere

#

And then stretch by X in the x direction, by Y in the y direction, and Z in the z direction, then you get the ellipsoid he is describing

hexed mural
#

That's a bit confusing

#

but that stretching has to be that of an ellispse

#

the values

#

for X,Y,Z

rose coral
#

Sorry I don't get which part you are confused by

hexed mural
#

so

rose coral
#

Are you confused at how stretching like that gives an ellipsoid?

hexed mural
#

yea

#

that's some transform

#

right?

#

applied to the unit sphere to give the Ellipse

rose coral
#

Yeah

hexed mural
#

is that transform

#

CBM?

rose coral
#

Not quite

#

So I was just describing how you can get an ellipsoid

#

CBM is more like a change in measurement

#

So is this for like programming a game?

hexed mural
#

when you say change in measurement you mean from one Vector Space to Another

#

Yea

#

I am learning

#

how collison works

rose coral
#

Not exactly from one vector space to another

hexed mural
#

been digging deep into it for a while

rose coral
#

That's cool!

#

Ok so

#

Lets imagine this ellipsoid exists in the game world

#

Not sure that's how its used but

#

Let's just go with it for now

hexed mural
#

The ellipsoid is used as a collision detection

#

it's sweeps across a velocity vector

#

then once detection is detected you do some collision resolution

#

anyway as you were saying

rose coral
#

Ok, but the ellipsoid is like "physically" in the game world, even if is just used to detect something

#

So in the game world you've conveniently labelled the points in space with 3 coordinates

#

Right?

#

Each point in the space is has like some x, y, and z components

hexed mural
#

The object will have a transform

#

yea

#

World coordinates

rose coral
#

Cool

#

But the point is that if you want to talk about an ellipsoid, or maybe the camera is suddenly rotating, you might want more convenient coordinates than the world coordinates

hexed mural
#

I don't think there should be any rotation

rose coral
#

You want to represent the same points in the "physical" space in game, but maybe while running some code it's simpler if you changed how you label the points

hexed mural
#

for the collison

rose coral
#

Yeah in this case there might not be

#

But if you need to pick different coordinates due to rotation, the same concepts apply

hexed mural
#

you mean to go from two different coordinate systems right

rose coral
#

My point is just that we want to talk about the same space but with different coordinates yeah

hexed mural
#

for now we can just care about it as something in world space

#

We can just care about Object to World Collision

#

So an object moving in world space has its world coordinates

#

and handling collision with walls

#

floors ceilings

#

etc

rose coral
#

That makes sense

#

And so the author of this thinks that to do the collision detection its easier to use "ellipsoid" coordinates instead of the world coordinates which are probably pretty arbitrary when it comes to collision detection

hexed mural
#

yea

#

I mean

#

I don't understand why he does this in the first place

#

Ellipsoid space

#

I am curious if this is how all Primitives are done

#

so

#

what I mean as primitives

#

are different types of geometry styles

#

you can have

#

Capsule, Box, Ellipsoid, Sphere

#

but at the end of the day

#

you're gonna have a plane touching some other plane

rose coral
#

Oh cool

hexed mural
#

if this interests you

#

Here was something else I was trying to figure out

#

it might be a bit simpler than what i asked earlier

#

ok so in this one

#

this is a top down view

#

so let's suppose we have a collision detection in a BOX we check 4 corners

#

once we have a collision detected

#

we find the path shortest from the center to the wall center and compute a slide location

#

what this is doing is sliding the object away from the wall

rose coral
#

Right

hexed mural
#

the question I am curious about is how they compute that Slide Location

#

apparently

#

it's done something like this

rose coral
#

I would imagine its that you decompose the vector into components

hexed mural
#

how so

#

how is that equation derived for DP

rose coral
#

DP is?

hexed mural
#

delta position

#

in the previous image

#

its the start -> goal

rose coral
#

Oh so how you would have moved if there were no wall

hexed mural
#

yea how they get that goal point I think is the shortest distance

#

to the center of the wall

#

from the center of your object

#

As soon as collision is detected

#

this stuff is not easy btw

#

so don't be discouraged haha

rose coral
#

Wait don't you start out with the goal position?

hexed mural
#

no

#

the goal i think is computed

rose coral
#

Then what information do you start with?

hexed mural
#

Delta

rose coral
#

And the start position

hexed mural
#

which will be your

#

position yea

#

then you also

#

know

#

the Normal for that wall

rose coral
#

Oh ok then it shouldn't be bad

hexed mural
#

i assume that subtraction

#

is between two vectors

#

A + -B

#

head to tail

#

to get the slide vector

#

I think

#

or it's a projection

rose coral
#

That would make sense

#

Ok so the goal position should be start + delta

hexed mural
#

yea

rose coral
#

And if you never detect a collision that's where you end up

hexed mural
#

yes

rose coral
#

Now

#

Say you detect a collision at some intermediate point C

#

for collision location

hexed mural
#

yea

#

box collison

#

so one of the corners

rose coral
#

Yeah

#

And let, idk, r be the amount you would have continued going to the goal position if for no wall

#

Sorry r is a vector, some amount of the delta that's left over

hexed mural
#

I think

#

collision location is

#

halfway

#

always

#

wait no

#

Goal = Delta + Start where

rose coral
#

If $n$ is a unit normal to the wall, then $(n \cdot r)n$ should be the component of $r$ that is going straight into the wall

stoic pythonBOT
rose coral
#

So you should slide according to $r - (n \cdot r)n$

stoic pythonBOT
hexed mural
#

yes

#

how did you find that

rose coral
#

So the dot product lets you project vectors

hexed mural
#

that equation

#

would be the slide vector

#

you solved for it

#

assuming it's Unknown right

#

you projected the Start to Goal Vector with the normal right?

rose coral
#

Not exactly, only the part that was left over from the collision detection

#

So however much you still have left to move

hexed mural
#

you mean collision to goal

rose coral
#

Yeah

hexed mural
#

so that's why you subracted R

#

so you'd get the distance from collision to goal

#

right?

rose coral
#

No

#

I can write it in terms of delta and the collision location if you want

#

But it would just be plugging in delta - (collision location - start location) = r

#

I subtracted because the term $(n \cdot r)n$ corresponds to the component going straight into the wall

stoic pythonBOT
rose coral
#

In your diagram, you have a vector from collision to goal and from collision to slide location

hexed mural
#

Yeap

rose coral
#

The $(n \cdot r)n$ represents the other side in that right triangle

stoic pythonBOT
rose coral
#

Pointing straight into the wall from the slide location to the goal

#

Because it is some scalar (n dot r), times the vector n whose direction is straight out of/into the wall

hexed mural
#

ah

rose coral
#

The scalar just makes sure its the right length

hexed mural
#

yeah ok we scale down it down with dot product yes of cource

#

N is the Normal

#

out the wall

#

from goal

rose coral
#

Yeah

#

For this thing to work it should be length 1, otherwise you need an extra factor

hexed mural
#

computing in my head

#

one second

rose coral
#

sure

hexed mural
#

k

#

did you

#

draw a right triangle

#

from start point

#

with goal normal

#

?

#

to find r

#

like a larger right triangle

rose coral
#

To find r, I just took the goal position - collision position

hexed mural
#

So R is the vector from the center of the object to the goal positon

#

just to be sure

#

we are on the same page

#

right?

rose coral
#

If the object is like beside the wall at the collision position yes

#

Not at the start position

hexed mural
#

ah

#

so you mean

#

r = Vector from Start -> Collision location

rose coral
#

No, from collision to goal

hexed mural
#

k

#

ok

#

so it's as follows

#
  1. Collision Detected with World Object.. a wall.
  2. Find R vector from Collision Location to Goal with the Delta
  3. Take the Dot Product with R and the Normal of the Goal Position of the Wall
#
  1. Subtract R - Result of Part 3. to Get the slide component Vector
rose coral
#

Yeah exactly

hexed mural
#

the two vectors

#

R->N

#

it's head to tail

rose coral
#

Well, in part 3 you get a number

hexed mural
#

so you have to subtract

rose coral
#

You need to subtract N, the normal, times the number from part 3

hexed mural
#

yea the Normal is unit vector

#

it's what's left over

#

from the projection

rose coral
#

Right but the dot product gives a single number

hexed mural
#

yeah

#

a scalar

rose coral
#

You want to subtract a vector

#

So I'm saying that you subtract the normal scaled by that number from the dot product

#

Which is a vector

hexed mural
#

yeah

rose coral
#

Ok cool

hexed mural
#

this will give us the final point

rose coral
#

Yeah

hexed mural
#

some point

#

yea

#

that's cool

#

is there a way to get that slide vector another way without doing a subtraction

#

or you have to do vector subtraction

rose coral
#

I don't know of a way

hexed mural
#

man that is wild

#

makes sense

rose coral
#

Yup, vectors