#linear-algebra

2 messages · Page 153 of 1

magic light
#

incorrect notation

stoic pythonBOT
half storm
#

That's probably fine.

#

I'll check with you

west spade
#

yeah that's the one I was looking for. a simple shift function that takes the basis {x^0,x^1,x^2...} to {x^1,x^2,x^3...} respectively

#

that clearly bijects the bases and you can extend to the whole space linearly based on that in the way described above

half storm
#

Yup it checks out

magic light
#

yeah, writing it out right now

#

thanks a lot guys!

#

I'm happy I actually came up with it by myself... don't want tobe totally reliant

half storm
#

u p much figured it out

magic light
#

I mean only through talking with you guys

#

I was sitting on this for awhile beforehand

#

actually I came to a problem

#

trying to prove KerT = {0}

#

f(x) = 0 => T(f) = 0 is easy, since T(0) = 0

#

but T(f) = 0 => f(x) = 0 doesn't work..

half storm
#

Where's the problem?

magic light
#

assume T(f) = 0
so x * f(x) = 0
if x != 0, then f(x) = 0

#

if x= 0 then... idk

half storm
#

x*f(x) is also a polynomial

#

It's a polynomial of x

#

x * f(x) = h(x)

magic light
#

yeah but I need to prove T(f(x)) = 0 <=> f(x) = 0

#

f(x) = anxn + ... a1x + a0

#

and x = 0

#

so f(x) = a0

#

so it's only 0 when a0 = 0

half storm
#

hmmm

#

Yea that's a problem.

#

lol

magic light
#

I was hoping you'll tell me I'm wrong

#

lol

#

so I have a question

#

T(f(x)) is in the image

#

so.... doesn't that mean a0 = 0?

#

I mean U = all polynoms s.t p(0) = 0

#

@half storm

#

save me

#

it doesn't make sense to me

#

what exactly is in KerT??

#

because here's the thing
T(3x + 2) = 3x^2 + 2x
T(3x + 3) + 3x^2 + 3x
both of them are 0 when x=0, obviously, but p(x) isn't 0 when x=0

magic light
#

@west spade can you assist me here? or <@&286206848099549185>

errant cedar
#

the sum of n=1 to infinity x^n = the sum of n=1 to infinity a_ne^n

#

it can be like that

half storm
#

@magic light T(f(x)) is the image of V under T. Since T is a map between V and U, it means that T(f(x)) has to be in U. Remember that T(f(x)) is a polynomial i.e. T(f(x)) = h(x) . So h(x) must be a polynomial such that h(0) = 0. The map that you constructed definitely makes the resultant polynomial a polynomial such that h(0) = 0.

#

The kernel of T is just the set of polynomials in V such that they get mapped to the zero polynomial in U.

magic light
#

yeah, so my solution doesn't work

errant cedar
#

its?

#

the sum of n=1 to infinity x^n = the sum of n=1 to infinity a_ne^n
it can be like that

magic light
#

because T(3x+2) and T(3x+3) can both be in the Kernel since for x=0 T(3x+2) = 0

half storm
#

Looks like it.

magic light
#

It feels impossible

half storm
#

lol yea

magic light
#

f(x) = p(x) + c
I need that T(f(x)) != T(p(x))
for all c != 0

half storm
#

Well.

#

I'm thinking about that statement again

#

Yea it's p hard.

magic light
#

If we need KerT = {0}, then we need for the transformation to only map to zero when p(x) = 0

half storm
#

yea

magic light
#

in other words

#

T(3x+2) != T(3x+3) != 0 for x=0 as well

#

no matter what it is

#

actually for x=0 it needs to be equal to 0

#

I don't get this

#

T(p(x)) = f(x), if p(0) != 0, then f(0) != 0
but by definition f(0) = 0

#

how is this not impossible

#

T:V-> U
so U are polynoms s.t f(0) = 0
V are polynoms in general, p(x)
so T(p(x)) = f(x)
p(0) != 0 => f(0) != 0
but by definition,
f(0) = 0

#

I wrote the same thing

#

I just don't see how that's possible ffs

west spade
#

Show that non zero vectors map to non zero vectors

#

So the only vector that maps to 0 is 0

magic light
#

but you don't understand

#

U is all p(x) in V s.t p(0) = 0

half storm
#

U is a subset of V but it's not all p(x) in V such that p(0) = 0

magic light
#

its the definition

half storm
#

oh nvm

magic light
#

p(x) in V s.t p(0) = 0

half storm
#

Well I guess it necessairly has to be the case.

#

anyways

#

if you think about it

magic light
#

T:V->U

#

so if T(p(x)) = f(x)
we know for a fact f(0) = 0

#

am I right?

half storm
#

if T maps from V into U it's got to be.

magic light
#

Right

#

So if p(0) != 0

#

it's in the kernel

#

which is a problem

#

think about it like that

half storm
#

how do you conclude that part

magic light
#

T(3x + 2) = g(x)
T(3x + 3) = f(x)

g(0) = f(0) = 0

#

but 3x + 2 != 0 when x=0

#

so they both map into the kernel

#

despite not being 0

#

I'm just trying to understand what's in the Kernel

#

the way I see it KerT = V

#

which seems impossible?

west spade
#

V isn’t part of the input space at all

magic light
west spade
#

You’re confusing T with these polynomials

half storm
#

They don't map into the kernel

west spade
#

Inputting numbers into polynomials is a total red herring

half storm
#

The kernel is the zero polynomial; the polynomial that is zero everywhere

west spade
#

What matters is inputting vectors (polynomials in this case) into T

magic light
#

OK @west spade

#

did you see where my "integral" like solution fell apart?

#

I don't understand what you mean by the zero polynomial then

half storm
#

T(3x+2) = g(x). g(0) = 0. the resultant polynomial T(3x+2) = g(x) = 0 for all values of x.

west spade
#

What is addition and scaling in this vector space

#

Then figure out what the 0 is

half storm
#

if you can show that g(x) = 0 for all values of x then 3x+2 is in the kernel.

west spade
#

Then continue

magic light
#

wait

#

so the kernel is just when p(x) = 0

#

?

half storm
#

The kernel is the set of vectors in V such that T(p(x)) = g(x) = 0 for all values of x.

magic light
#

yeah

half storm
#

g(x) = O(x) where O(x) = 0 for all values of x.

magic light
#

So

half storm
#

So basically what I'm trying to say that T(3x+2) = g(x) ; g(0) = 0 for sure. But that doesn't mean that g(x) = 0 for all x i.e. everywhere which is what you need for 3x+2 to be in the kernel of T.

magic light
#

yeah

#

got it now

half storm
#

Cool, I couldn't tell if I was reiterating something you already understood.

magic light
#

just got it as you were writing

#

<@&286206848099549185> I'm on this for 3 hours now in a row, anyone that can jump in most appreciated...
V = R[x] all polynoms with one variable ( anx^n + ... + a1x + a0)
U = {p(x) in V : p(0) = 0}

I need to prove U and V are isomorphic, ie - to find a transformation T:V->U that's bijective

stiff frost
#

Worry about the linear stuff later. Can you find a bijection at all?

magic light
#

Nope.

#

I tried T(p(x)) = x*p(x) but it didn't turn out bijective

#

the idea was to "save" the constant

#

that was my best result thus far... it fell when proving KerT = {0} at the end

half ice
#

Why is that not bijective?

stiff frost
#

"it didn't turn out bijective" Can you explain what went wrong? If you're correct that it's not bijective, maybe a modification of the idea can fix it.

magic light
#

I'm trying to prove T(p(x)) = 0 < => p(x) = 0, that'll mean KerT = {0}

Assume T(p(x)) = 0, prove p(x) = 0
x * p(x) = 0
if x != 0, then we can divide it and we're OK
if x = 0, then p(x) = a0 which is the constant

#

and can be anything

stiff frost
#

x isn't a number

half ice
#

Note that x is an element of your space and, in this context, isn't a placeholder and doesn't take a value

magic light
#

I may be misunderstanding then

half ice
#

Mind you, your start is good

half storm
#

I think I see where this is going but I'm just observing lol

magic light
#

e.g T(3x+2) = 3x^2 + 2x
T(3x + 3) = 3x^2 + 3x
3x^2 + 3x = 0 when x=0(I know you said it's not taking a value, but I'm confused about that)

#

Since T:V->U and U is all p(x) s.t p(0) = 0

stiff frost
#

The big issue here is what the 0 means in "p(x)=0" or "{0}"

#

And what x means too I guess

magic light
#

maybe I need to prove Ker T = {p(0)}?

#

I'm a bit confused about that

half storm
#

You had that right before

stiff frost
#

The elements of the vector space V are polynomials, so try not writing them with function notation

half storm
#

gotta show that p(x) = O(x) for all x.

#

O(x) = 0 for all x.

stiff frost
#

That's...only works because we have the reals R

magic light
#

Yeah, we're over R here

half ice
#

The only polynomial that counts as 0 is the polynomial f(x) = 0

magic light
#

😒

#

So

#

I'm trying to comprehend this lol

half ice
#

xp(x) can never be 0, unless p(x) was itself

magic light
#

How did you come to that?

half storm
#

I can see how for all x except for x = 0 you're forced to conclude that p(x) = 0.

stiff frost
#

that's work you have to do to fully solve the problem, but it's important that Kaynex's 0 isn't just like "evaluates to 0 sometimes", it's the polynomial 0.

half storm
#

But how do you know that p(0) = 0

half ice
#

Basically in lin alg, setting
x = thing
isn't baked into the structure

#

The space of R[x] has polynomials, not functions.
x² + 1 is an element, not a function.

stiff frost
#

The function notation p(x) really gets in the way here in some sense

half ice
#

Much like 1 is an element of R

half storm
#

I c kind of.

magic light
#

Okay, so how did we then define U?

#

U is all the elements, polynomials, s.t p(0) = 0

half ice
#

That's different, haha. So U is the space that IF THEY WERE FUNCTIONS ALL OF A SUDDEN,
p(0) = 0

magic light
#

ohhhh

half ice
#

I get the confusion haha

magic light
#

Basically the "such that" is just completely unrelated

stiff frost
#

They could have written U as "the polynomials with a0=0" or similar

half ice
#

Mind you, this idea works really well because p(0) = 0 does happen to define a vector space

magic light
#

Yeah, I'm confused about what I'm working with

half ice
#

The question ends up becoming "show that the space of all real polys is isomorphic to the space of all real polys without a constant term"

magic light
#

With normal vectors, T(v) = u
what in my case are the elements? I treated them like functions

#

like T(f(x))

stiff frost
#

The elements of V are like finite lists of coefficients that we happen to write next to symbols like x^5.

magic light
#

So T(3x+2) = 3x^2 + 2x for example
my element in the kernel is (3x+2)

stiff frost
#

That's not in the kernel since 3x^2+2x+0 is not the same polynomial as 0

#

It's a quadratic, for instance.

magic light
#

OK, so herein lies the confusion

#

in general

#

T(v) = 0 => v in Kernel

#

in my case

#

T(3x+2) = 0 => 3x + 2 in Kernel?

stiff frost
#

3x^2+2x+0 is a quadratic that evaluates to the number 0 if you evaluate it at certain numbers (plugging in for x), but it's not "the zero polynomial" or "the zero vector in V"

magic light
#

so if T(3x + 2) = 3x^2 + 2x
it is not in the Kernel

#

Alright, so let me try this again better equipped

half ice
#

Ooh that's a good way to state that.
There's a difference between a polynomial that evaluates to 0 somewhere and a polynomial that evaluates to 0 everywhere

#

The polynomial that is 0 for all x is the zero vector in the space

#

(And not the polynomial that is zero for some choice of x)

#

Mind you, evaluating polynomials is not an important part of lin alg. We instead care about the algebraic structure on polynomials

magic light
#

OK so I need to prove T(v) = 0 <=> v=0
in my case, T(p(x)) = 0 <=> p(x) = 0

first side:
Let p(x) = 0, then T(p(x)) = T(0) = 0

second side:
Let T(p(x)) = 0, then x*p(x) = 0 for all X => p(x) = 0

thus KerT = {0}, the transformation is thus bijective, and U and V are thus isomorphic?

magic light
stiff frost
#

" x*p(x) = 0 for all X => p(x) = 0" This not not obvious in that if x=0, it would seem that p(0) wouldn't have to be 0.

#

The contrapositive of that implication is probably easier to prove

magic light
magic light
half ice
#

No need to state "for all x" imo it's obvious when the zero vector has to be p(x) = 0

stiff frost
#

"for all x" clarifies against the confusion of a particular x blackmamba had before

half ice
#

Let's look at "first side". It should say:
Let p(x) = 0, then T(p(x)) = x*0 = 0

#

Oh wait that is what you said

magic light
#

I used T(0) = 0 for all linear transformations

half ice
#

Mb I misunderstood haha

magic light
#

so no need to even explicitly state it

stiff frost
#

" => p(x) = 0 " If you want to conclude that p(x) equals "the zero polynomial", and understand the zero polynomial based on it being the zero function, then you need to show that p(x) = 0 for every input x, yes.

#

But I prefer to think of the zero polynomial as "the one with all coefficients zero" or "the one with no nonzero coefficients"

magic light
#

Well, I'm trying to prove that Ker T = {0} via T(p(x)) = 0 <=> p(x) = 0

#

so it feels kinda bad to just assume it's the zero polynomial when you're trying to prove it from =>

stiff frost
#

I was responding to "I need it to satisfy for all x's, not just x=0?" and saying "yes", basically

magic light
#

I'm trying to prove that T(p(x)) = 0 means that for my specific function, the only solution is the zero polynom

#

oh

half ice
#

I think there's an implied understanding that T will never remove any existing coefficients

#

And so can never map anything to the zero polynomial

stiff frost
#

I don't think it's "an implied understanding", I think the problem is asking for the person to prove that

half ice
#

Ok

magic light
#

At the end of the day this is an assignment I need to hand in, so I do want to do it proper

#

this is just the first question 😄

#

I've spent 3 hours here and 2 hours beforehand just misunderstanding completely

#

and I'm still not sure if my solution T(p(x)) = x * p(x) is correct... I'm just waiting for confirmation

half ice
#

It is, haha. Continue to develop it.

magic light
#

In my solution, I first proved that it is a transformation

#

but I did it explicitly

half ice
#

Σ a_n x^n
Is a useful form here

magic light
#

k T(p(x)) = k * sum(a_n x^n) = sum(k*a_nx^n) = T(kp(x))

#

except I used alpha instead of k but yeah

half ice
#

Mind you, you're pretty much done. Get the injective layed out correctly and that's really it

magic light
#

Wait

#

KerT = {0} doesn't imply bijective?

half ice
#

Oop, I thought for some reason you already got surjective

stiff frost
#

No. For example, R->R^2 by sending t to (t,0). It's not bijective

magic light
#

I see.

#

So I need to prove surjective now

stiff frost
#

Injective (with the kernel stuff, say) and surjective

magic light
#

So I proved injective

#

okay

stiff frost
#

"So I proved injective" not in this chat, but if you finished it elsewhere, good work

magic light
#

Why didn't I, in the chat?

#

what am I missing?

#

KerT = {0} implies injective right?

gray dust
#

in fact ker={0} iff injective

magic light
#

yeah

stiff frost
#

You had a proposed proof, and I said you need more justification for " x*p(x) = 0 for all X => p(x) = 0"

half ice
#

Yes. But you should run through
Σ a_n x^n
To really do it

magic light
#

hmm

acoustic path
gray dust
#

composition

half ice
#

Because you're correct,
Tp = 0 iff p = 0
isn't obvious

#

I mean it is, but put your brain on the paper lol

magic light
#

So, I don't really understand why "for all X" is incorrect?

stiff frost
#

Again, it IS correct

#

I think you had wanted "x*p(x) = 0 for all x => p(x) = 0 for all x" and that's a fine statement to want. For nonzero x, you can divide by x to find that p(x)=0 at that particular x. But this argument has trouble for a zero input to x

#

There are at least three different approaches to fixing this issue.

magic light
#

I don't understand why it's a problem for x=0 either though
we need the statement to be true for (x = 0 AND x=1 AND x=2.... )

#

if one of them falls the rest do too

stiff frost
#

Suppose p(0)=17

#

then 0*p(0)=0*17=0, but we don't have "p(x)=0 for all x"

magic light
#

hmm

#

Kind of feels doomed then

#

if p(0) = 17 then it's not the zero polynom, and KerT isn't just 0

half ice
#

p(0) = 17 fails to be a vector space

stiff frost
#

Kaynex I think you've confused what I was talking about

#

"feels doomed then" Spoiler: It's actually not doomed. But since it feels doomed, you definitely need more justification/a new justification of "x*p(x) = 0 for all x => p(x) = 0 for all x"

magic light
#

OK, I may be misunderstanding again

#

ah

#

I get it

#

I mean... I get the issue

#

I just don't understand how I can prove p(0) = 0

stiff frost
#

I recommend trying to prove the contrapositive of "x*p(x) = 0 for all x => p(x) = 0 for all x", if you're comfortable enough with logic to write the contrapositive and negate the parts correctly.

#

If not, there's still an approach that can work directly, but the problem is now much harder (unless you stop thinking of polynomials as functions)

half ice
magic light
#

I'm getting conflicting suggestions here..

stiff frost
#

"You want to prove that
IF p(x) = 0
THEN xp(x) = 0"
What? No! That was already done and obvious

half ice
#

Or, yes I am flipping the order, sorry.

#

See the edit

magic light
#

yeah I'm trying to prove that

#

but when x=0, p(x) doesn't need to be 0

#

for the equation to hold true

stiff frost
#

I have to go. Good luck!

magic light
#

so I need to prove it despite that fact

#

that p(x) = 0

#

thanks @stiff frost

#

have a good one

half ice
#

So this is the difference between a polynomial "being the zero polynomial" and a polynomial "having a zero"

#

Considering the case where x = 0 is not useful to you

magic light
#

dirib told me my proof is incomplete the way it was... so I don't understand how to fix it lol

half ice
#

Your proof is logically right, but isn't rigorous

magic light
#

I have a feeling it's not even logically correct tbh

half ice
#

Show that
If p is not the zero poly
Then xp isn't either

#

The contrapositive, as dirib suggested

magic light
#

that's the same though

#

p(x) != 0 => x*p(x) != 0 is only true when x != 0

#

when x = 0 then p(x) not being 0 doesn't matter

half ice
#

Why?

magic light
#

because think about it outside of the context here, just through logic

haughty pilot
#

Hi, does anyone know how to quickly/simply find the rank of a matrix

half ice
#

Yaya, the logic is good. But on your paper you'll want to prove this

magic light
#

assume for a moment x = 0, then p(x) != 0 => x*p(x) != 0 is not correct proof

#

sorry

half ice
#

So this is the difference between a polynomial "being the zero polynomial" and a polynomial "having a zero"
Considering the case where x = 0 is not useful to you

magic light
#

_>

#

I'm sorry. I don't get what I'm saying differently from dirib earlier...

haughty pilot
#

🙏🙏

magic light
#

yeah I get that

#

but I'm trying to prove that p(x) is indeed the zero polynomial

#

it has the same flaw

#

OK

haughty pilot
#

Can someone help me pls?

magic light
#

Let me try writing it out

#

x*p(x) = 0 for all x => p(x) = 0 for all x is my original statement

#

x*p(x) != 0 => p(x) != 0 for all x's is incorrect

#

or ehm I think so

#

it's not?

#

I thought the contrapositive is notP -> notQ

#

ah

#

it's notQ -> notP

#

OK ok

#

x*p(x) = 0 for all x => p(x) = 0 for all x is my original statement

#

p(x) != 0 => x*p(x) != 0 right?

#

so it doesn't work

#

because when x=0, p(x) doesn't need to be 0 as well

magic light
half ice
magic light
#

I'm trying to prove p(x) is the zero polynom

#

right?

#

I don't know it is the zero polynom

half ice
#

Oh

#

That's an interesting point haha

#

But there doesn't exist a poly where this can happen

magic light
#

Basically, I'm trying to use the fact that T(p(x)) = 0 to prove that p(x) MUST be the zero polynomial

#

hmm

#

yes

#

T(p(x)) = x*p(x)

half ice
#

Nuu too complicated.
Consider p(x) = Σ axⁿ
is not the zero poly.

What's Tp?

magic light
#

hmm I guess continuity is an option

#

all polynomials are continuous ?

#

yes

half ice
#

$T(p) = \sum a_nx^{n+1}$

stoic pythonBOT
half ice
#

Now, that's only the zero poly if a_n is zero for all n

magic light
#

yeah but it's not the original p anymore

half ice
#

Which means that p(x) would have been the 0 poly

magic light
#

even if all a_n are 0 there's still a0

#

also

#

when x=0

#

none of these have to be zero

half ice
#

a0 is an a_n

magic light
#

but I think the function continuity works

#

for x = 0, there's no reason that a_n = 0

#

they can be anything just based on that

#

Let me rewrite my proof

half ice
#

x² + x
Still has a2 = 1, a1 = 1
Even if x = 0

#

Because if x = 1, that poly isn't 0 anymore, and therefore is not the zero polynomial

magic light
#

yeah, but I'm not trying to contradict something is the zero poly, I'm trying to prove a polynom is indeed the zero polynomial

#

@half ice let me write something out for a sec

#

tell me what you think?

half ice
#

Like, x² and x are different elements of R[x]
Despite both of them evaluating to 0 for x = 0

magic light
#

I know, but I'm trying to prove that there isn't some crazy polynom that is 0 for everything except 0

#

it's obviously not the case

#

Let T(p(x)) = 0, then x * p(x) = 0 for all x in R
if x != 0 then p(x) = 0
if x = 0 then p(x) = 0, because otherwise the polynomial function is not continuous

stiff frost
#

Just checking in. blackmamba's current thoughts are one of the three ways I was thinking of

half ice
#

If p(x) = Σ anx^n is not the zero poly, there exists an an ≠ 0
(Including a0, which can be nonzero in V!)

Then Tp = Σ anx^(n + 1) and the non-zero an still exists. So, Tp is not the zero poly either

stiff frost
#

Kaynex, blackmamba has a nice approach using continuity. I don't think they need a different one (though it might be good to show afterwards)

half ice
#

I really think they do, as imposing continuity for a lin alg course is a very strange choice

#

I mean, give it a shot if you really want

magic light
#

I mean the most I'm going to do is say that p(x) != 0 breaks continuity there's no way I'm going to go back to calculus 😢

magic light
half ice
#

That would work (though you can simplify the language using a contrapositive). But you'll have to prove it

magic light
#

So the surjective should be easy

#

let p(x) in U, if p(x) = 0 then it has a source in V, T(0) = 0.
otherwise, the minimum power of p(x) = 1, thus p(x)/x is in V and
T(p(x) / x) = x * p(x)/x = p(x) thus it has a source

T is surjective

#

@half ice

half ice
#

Yeah that works!

magic light
#

thanks a lot!! @half ice @stiff frost @wintry steppe

spice birch
#

Given a 3x3 affine transformation matrix, I need to find the matrix's translation, rotation and scale.

#

$\begin{bmatrix} a & d & g \ b & e & h \ c & f & i \end{bmatrix}$

stoic pythonBOT
spice birch
#

I think I got the transformation part as: vec2(g, h)

#

Given no skew is being performed, I think I can derive rotation to be asin(b) or asin(-d)?

#

I have no idea how to tackle scaling

#

I am probably wildly off base on how far I am oversimplifying this

slow scroll
#

so are you assuming the matrix represents something of the form, rotation + translation + scale?

wintry sphinx
#

you need to define which order they're done

slow scroll
#

no, these are rotations in the plane

#

sqrt(a^2 + b^2) would be the amount you scale by. To get the exact rotation, you might need both arccos(a/sqrt(a^2 + b^2)) and arcsin(b/sqrt(a^2 + b^2)).
Assuming we're talking about homogeneous coordinates, c=f=0 and i = 1, and the amount you translate by is (g,h)

spice birch
spice birch
slow scroll
#

i think saccharine is referring to order of rotation in 3D

spice birch
#

So that translation is based off the scale and rotation

wintry sphinx
#

no I'm referring to the order in which you do the operations

spice birch
#

Now, another interesting thing I noted with perusing GLM's implementation of 4x4 affine transformation matrix decomposition, they scale the entire matrix by A[3][3] (bottom right column and row) to normalize it. I am guessing I should do the same thing for when I am doing a 3x3 decomposition?

#

That would be to normalize my 3x3 matrix to make i = 1

slow scroll
stoic pythonBOT
slow scroll
#

r is amount scaled and (tx, ty) is translation, and theta is angle of rotation

spice birch
slow scroll
#

oh, yea you could apply a scale like that (also, forgot the r on the cosine in the 2, 2 entry lol)

wintry sphinx
#

@slow scroll it just means that your interpretation of the matrix changes, depending on the order in which you consider these things to happen

#

Say you have an affine transformation that translates by [1, 0, 0] and then scales by 2; it has a transformation matrix

#

now if you consider the order of operations to be scaling and then translation, then you have a scale by 2 and translate by [2, 0, 0] for the same matrix

spice birch
#

How would one solve for the vec2 scale of the matrix? Would it be:

#

$vec2(sqrt(a^2 + b^2), sqrt(d^2 + e^2))$

stoic pythonBOT
slow scroll
#

i see what you mean saccharine

#

@ unknown the way i've written things, yes, you can have a scale factor in the a,b entries for the x direction and a scale factor in d,e for the y direction

spice birch
#

Alright, now with that, returning back to rotation, we left off at:

To get the exact rotation, you might need both arccos(a/sqrt(a^2 + b^2)) and arcsin(b/sqrt(a^2 + b^2)).
How did you mean to combine these calculations to get a more precise angle?

slow scroll
#

lets say you rotate a vector 45 degress clockwise about the origin. Then you have arccos(cos(-pi/4)) = pi/4, so you lost the sign of the rotation.

#

to mitigate this, it suffices to know the sign of sin(theta). In this case, sin(-pi/4) < 0 so we know the angle lies in the 4th quadrant.

#

an example that may or may not make sense: its the same kind of reasoning why programming languages often have an atan2(x,y) which "detects signs" when computing arctan(x/y)

spice birch
#

Alright. Yea. The divide by zero case for atan2

slow scroll
#

if you have access to an atan2 function, you can compute the exact angle by computing atan2(b, a) instead of all the stuff we were doing before

#

its not about division by zero

spice birch
#

Sorry, yea, atan(-x / -y) would be the same as atan(x / y) even though they are in different directions

slow scroll
#

yep

spice birch
#

atan(b, a) would be equivalent to atan(d, e) right? And lastly, what would happen if one was to apply a sheer to the matrix? Would that effect the result of the two theta calculations (ie. atan(b, a) = atan(d, e))?

slow scroll
#

by atan, you mean atan2, right? i don't see how atan2(b,a) is the same as atan2(d,e). atan2(b,a) is what you want though because b/a is the tangent of the angle, whilie d/e is -tan of the angle.

what would happen if one was to apply a sheer to the matrix?
im not sure i'm understanding. If you apply a shear, the transformation might not even have the same form as $\begin{bmatrix} s_x\cos \theta & -s_y\sin \theta & t_x \ s_x \sin \theta & s_y\cos \theta & t_y \ 0&0&1 \end{bmatrix}$

stoic pythonBOT
spice birch
#

Applying a shear to the matrix is apparently:

#

$\begin{bmatrix} 1 & a & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix}$

slow scroll
#

you need two backslashes for a newline

stoic pythonBOT
spice birch
#

I believe that is also a shear along one dimension as well

#

Where the other might be:

#

$\begin{bmatrix} 1 & 0 & 0 \ a & 1 & 0 \ 0 & 0 & 1 \end{bmatrix}$

stoic pythonBOT
slow scroll
#

my point is just that if you start with $$ \begin{bmatrix} s_x\cos \theta & -s_y\sin \theta & 0 \ s_x \sin \theta & s_y\cos \theta & 0\ 0&0&1 \end{bmatrix} $$
and apply some shear by left or right multiplication to get the matrix we'll call $A$, there might not exist new constants $s_x', s_y', \phi$ such that $$A = \begin{bmatrix} s_x'\cos \phi & -s_y'\sin \phi & 0\ s_x' \sin \phi & s_y'\cos \phi & 0\ 0&0&1 \end{bmatrix}. $$
At least, this isn't immediately clear to me.

stoic pythonBOT
spice birch
#

Would the equation be able to be adapted to the following equation to compensate for shear ($\tau$ in both x and y components)?
$$ \begin{bmatrix} s_x\cos \theta & -s_y\sin \theta \tau_y & x \ s_x \sin \theta \tau_x & s_y\cos \theta & y \ 0&0&1 \end{bmatrix} $$

stoic pythonBOT
spice birch
#

I believe this would throw a monkey wrench into the equations we were using to derive rotation and scale.

slow scroll
#

I believe this would throw a monkey wrench into the equations we were using to derive rotation and scale.
yes, it would. Also, what you've applied isn't a shear

#

A shear applied after the other stuff would be whatever $$\begin{bmatrix}1&\tau & 0 \ 0&1&0 \ 0&0&1 \end{bmatrix} \begin{bmatrix} s_x\cos \theta & -s_y\sin \theta & 0 \ s_x \sin \theta & s_y\cos \theta & 0\ 0&0&1 \end{bmatrix} $$ is, and a shear applied before the other stuff would be whatever $$ \begin{bmatrix} s_x\cos \theta & -s_y\sin \theta & 0 \ s_x \sin \theta & s_y\cos \theta & 0\ 0&0&1 \end{bmatrix} \begin{bmatrix}1&\tau & 0 \ 0&1&0 \ 0&0&1 \end{bmatrix}$$
comes out to.

stoic pythonBOT
spice birch
#

Ah, so tau would be foiled distributed into many places into the resulting matrix

slow scroll
#

yeah basically. And I have no idea if you can represent every linear transformation of the plane as the composition of a scaling factors applied to the x and y axes, a rotation and a shear. Even if you could, I don't know if this is exactly the most intuitive/useful way to think about linear transformations

#

I assumed this whole time we were talking about some special class of transformations that were scales + rotations

spice birch
#

"some special class of transformations"?

#

I am just trying to find the values used to compute the 3x3 affine transformation matrix A.

#

Every library I found will start with an identity matrix for a 3x3 matrix and apply matrix operations to add onto the affine transformation matrix.

#

But none I have found will decompose the matrix (other than GLM which only has it for a 4x4 matrix) into translation, scale, rotate

#

Or are you considering shear to be a special class of transformations?

slow scroll
#

okay, im saying if we consider the definition of "affine transformation" to be the composition of a rotation, shear, translation, and scaling matrices in homogeneous coordinates, its not immediately clear that the product of two affine transformations is an affine transformation. It sounds like the API you've linked me to asserts that it is. I guess there is some kind of complicated algebra to recover the angles and scale/shear factors, but idk too much about this stuff

spice birch
#

roger

slow scroll
#

what seems likely is that these transformations can be reduced to elementary row operations, so all linear transformations of the plane are covered, but you cannot always preserve the order of multiplication, so the affine transformation is a wild composition of shears, rotations, translations, etc...

spice birch
#

True, this is where Saccharine asked which order of operations are each of these applied with. I can come up with an affine transformation matrix using multiple operations. Each of these operations being order dependent to come up with a resultant matrix according to the operations performed.

#

What I am trying to solve is given that I have a function that (somewhat) arbitrarily applies the order of operations as scale -> rotate -> shear -> translate I get a resultant matrix A. Now, should I have another affine transformation matrix A, regardless of how it was generated, I would like scale, rotate, shear, and translate such that if I apply them in the order that I have above, it can regenerate A using the function first described.

#

Such that I have f(scale, rotate, shear, translate) -> A and f'(A) -> [scale, rotate, shear, translate]

#

So when you mentioned above that the order of operations is important for if you apply shear first or second. Suppose the operation is always performed in the operation described earlier. Which I think is translation * shear * rotate * scale if I am doing my math right?

slow scroll
#

yes, that looks right

spice birch
#

So I guess that would leave the resulting affix transform matrix to be:

#

$$
\begin{bmatrix}
1&0&x \
0&1&y \
0&0&1
\end{bmatrix}
\begin{bmatrix}
1&\tau_x & 0 \
\tau_y&1&0 \
0&0&1
\end{bmatrix}
\begin{bmatrix}
\cos \theta & \sin \theta & 0 \
\sin \theta & \cos \theta & 0 \
0&0&1
\end{bmatrix}
\begin{bmatrix}
s_x & -s_y & 0 \
s_x & s_y & 0\
0&0&1
\end{bmatrix}
$$

stoic pythonBOT
slow scroll
#

is the second thing really a shear?

spice birch
#

Which I think equals a google search to find a pharmacy

slow scroll
#

the api you linked me to seems to suggest that you only need
1 tau
0 1
to describe all of the transformations you want

spice birch
#

Yea, I think I am getting ahead of myself and attempting to cheat at math

slow scroll
#

anyway, im not really sure how to go about creating a function f' that does what you want. seems pretty difficult. Practically speaking, you might be better off just manually keeping track of the transformations you apply

spice birch
#

Well, unfortunately, if you do a translate #1 -> rotate -> translate #2. That isn't the same thing as translate = translate#1 + translate#2

slow scroll
#

yea, translate and shear mess things up. If it was just scaling and rotating, everything would commute nicely.

#

actually wait no (scaling matrices won't commute with other matrices)

#

also the 4th matrix in your picture is not a scaling xd

spice birch
#

Oh, yea. and I messed up the signs

slow scroll
#

basically, its all wrong except the first one :p

spice birch
#

yup

#

Would this be a corrected version of shear?

#

$$
\begin{bmatrix}
1&\tau_x & 0 \
0&1&0 \
0&0&1
\end{bmatrix}
\begin{bmatrix}
1&0 & 0 \
\tau_y&1&0 \
0&0&1
\end{bmatrix}

\begin{bmatrix}
\tau_x \tau_y + 1& \tau_x & 0 \
\tau_y&1&0 \
0&0&1
\end{bmatrix}
$$

stoic pythonBOT
slow scroll
#

i mean, this is just the composition of two different shears

#

again, according to the api, you only need the first one to represent all affine transformations, but perhaps its convenient to include the second one on its own as a "shortcut"

spice birch
#

$$
\begin{bmatrix} 1&0&x \ 0&1&y \ 0&0&1 \end{bmatrix}
\begin{bmatrix} \tau_x \tau_y + 1&\tau_x & 0 \ \tau_y&1&0 \ 0&0&1 \end{bmatrix}
\begin{bmatrix} \cos \theta & -\sin \theta & 0 \ \sin \theta & \cos \theta & 0 \ 0&0&1 \end{bmatrix}
\begin{bmatrix} s_x & 0 & 0 \ 0 & s_y & 0\ 0&0&1 \end{bmatrix}
$$

stoic pythonBOT
spice birch
#

I think that is the corrected full length form of each of the operations in the order I use to generate a affine transformation matrix using "f()"

slow scroll
#

so, why not just keep track of the operations you apply? instead of f() generating a matrix, it generates an ordered list of these translations, scalings, rotations, etc.... and then have another function that eats a list of these operations and spits out the corresponding matrix?

#

oh wait, i guess that's what you already kind of have?

spice birch
#

Yea, I would like to get away from keeping a sequence of transforms to create a resultant. Mainly because there can be a lot of them. Storing them in memory like that is a bit excessive.

#

Plugging in this monstrosity into the WolframAlpha machine (using {[1, 0, x], [0, 1, y], [0, 0, 1]}{[rs+1, r, 0], [s, 1, 0], [0, 0, 1]}{[cos a, -sin a, 0], [sin a, cos a, 0], [0, 0, 1]} {[u, 0, 0], [0, v, 0], [0, 0, 1]}) gives me a rather nice result. Well, nicer than I thought it would turn out to be...

#

$$
\begin{bmatrix}
s_x(cos \theta(\tau_x \tau_y + 1) + \tau_y sin \theta)) & s_y(\tau_y cos \theta - sin \theta (\tau_x \tau_y + 1)) & x \
s_x(\tau_x cos \theta + \sin \theta) & s_y(cos \theta - \tau_x \sin \theta) & y \
0 & 0 & 1
\end{bmatrix}
$$

stoic pythonBOT
spice birch
#

The interior 2x2 is a bit of a cluster truck.

last gazelle
#

what do i do if i have a 3rd degree polynomial but no 2nd power

#

its for diagonalization

#

is there any other way besides rational root theorem

wintry steppe
#

can you be more specific about what you're trying to do?

last gazelle
#

is there a way for me to type lambda

#

as a symbol

wintry steppe
#

$\lambda$

stoic pythonBOT
hollow finch
#

thats all that tells you though

#

rational roots theorem is usually a good backup plan but its possible to guess them

#

whats the determinant of the matrix

last gazelle
#

ok so basically im trying to find the eigenvalues of a 3x3 matrix and i got
$\lambda$^3 - 21$\lambda$ + 106

stoic pythonBOT
last gazelle
#

and i have no clue what to do

#

can i throw in a 0$\lambda$^2

stoic pythonBOT
hollow finch
#

uh yeah but why

last gazelle
#

thats the only way i could think of solving for lamba

#

lambda

#

im not very good at math

hollow finch
#

well its a cubic whether or not you write the quadratic term

#

so no need

#

unless you really want to

#

in which case go for it

last gazelle
#

what does that tell me

hollow finch
#

well cubics with real coefficients have at least one real root. but i don't think thats particularly helpful

last gazelle
#

is the only way to go about this the rational root theorem?

hollow finch
#

what is the determinant of the matix just checking

last gazelle
#

20

hollow finch
#

then i know you did not calculate the characteristic polynomial correctly

#

what is the trace of the matrix

#

(sum of the diagonal entries)

last gazelle
#

0

hollow finch
#

okay so the quadratic term is correct

#

would you mind posting a picture of the matrix itself?

last gazelle
#

so i should redo

#

its a homework problem so idk how far you could help me

#

bc of server rules

hollow finch
#

im pretty sure the -21 lambda is correct

#

homework is okay

#

tests/quizzes are not

last gazelle
#

ok cool

#

i probably made a small mistake while getting my polynomial

#

or big one...

hollow finch
#

it happens

#

it was small

#

calculating that big ugly determinant is kind of a grueling task

last gazelle
#

yeeeppp

hollow finch
#

so we want 3 numbers which add up to zero and multiply to 20

last gazelle
#

oh i see

#

and thats what the eigenvalues would be?

hollow finch
#

yeah

last gazelle
#

ah i didnt know you could find them like that

hollow finch
#

yep!

#

its not always super fast for 3x3s but sometimes you get lucky and you can guess them right away

last gazelle
#

-4, 5, -1?

hollow finch
#

actually yeah thats it

last gazelle
#

is there any case where that method gets me multiple possible combinations but where only one combination is correct

#

or should i not worry about that

#

that could actually never be possible im gonna watch a 3blue1brown vid later to get more context

hollow finch
#

yeah thats possible

#

but if you guess one eigenvalue correctly you can adjust your search

last gazelle
#

how can i tell if my eigenvalue is correct? find the corresponding eigenvector?

hollow finch
#

for example if you guessed -4 and you know its an eigenvalue then you know the others add up to 0-(-4)=4, and they multiply to 20/(-4)=-5. then you would know that -1 and 5 would be the remaining ones.

#

yeah sometimes an eigenvector jumps out at you

#

if each row adds up to the same amount, for example, then (1,1,1) is an eigenvector.

#

there are many tricks but you dont have to know all of them right away.

last gazelle
#

ok i see

#

thank you for your help

hollow finch
#

np 🙂

blissful pagoda
#

Wanna make sure I understand. This means dot product of u and v and then that use that scalar that the dot product returns on the vector v as if you have cv?

native rampart
#

Yes

slate fox
#

how do i count the number of elements in Hom(F^2,F^2)?

autumn lance
#

Is there somebody who knows how to do that ?

slate fox
shrewd mortar
#

@slate fox so, you're just trying to count how many 2x2 matrices there are with entries in F, this is rather straightforward

slate fox
#

hm

#

weird, we havent started matrices yet so i wasnt thinking about it like that

#

but anyway if F has p^n elements then F^2 has p^2n elements and Hom(F^2,F^2) has p^8n elements

#

right?

quartz compass
#

no only p^4n @slate fox

#

cause of what archsys said

#

there are only 4 entries

#

oh I see what you mean by haven't started matrices yet

reef ridge
#

How can I find the basis of a subspace if the subspace consists of matrices?

#

I'm really stumped, all I see is how to do it with vectors

#

Do I treat the matrix like a system of equations or something?

wintry steppe
#

a matrix is a vector; vector in this case means "element of a vector space"

#

spanning and linear independence still make sense in this case, the definitions are entirely analogous

#

and those are what you need for a basis

#

maybe you should post the actual question catThink

reef ridge
#

number ii

wintry steppe
#

try to take an arbitrary element of U and write it as a linear combination of "simpler" matrices in U catThink

#

of course, not before recalling what a basis is

reef ridge
#

so something like A or just something with random real numbers

wintry steppe
#

A

reef ridge
#

gotcha

#

oops sorry it's on its side

wintry steppe
#

looks good so far

nocturne jewel
#

,rotate

stoic pythonBOT
reef ridge
#

oh cheers

#

so should I put scalars in front of each of them?

wintry steppe
#

well you can simplify what you have in your picture more

reef ridge
#

hmm

#

like a row reduction or something?

wintry steppe
#

no

reef ridge
#

ah sorry

wintry steppe
#

in each of your matrices the only entries are all the same

#

so maybe you can pull the scalars out catThink

reef ridge
#

ohhh

#

so would these matrices with the scalar taken out be the basis then?

#

or is there more to be done

wintry steppe
#

you've basically already showed that they give you a spanning set for U

#

and there's one other condition for forming a basis

reef ridge
#

because you could construct an element of U by adding and scalar multiplying them?

wintry steppe
#

mmhm

#

you could construct any element of U by doing that

#

which you just showed

reef ridge
#

right!

#

thank you so much

wintry steppe
#

what is left to check?

#

just to make sure you know where to go from here catThink

reef ridge
#

the dimension of U? That's the number of elements in the basis, right?

wintry steppe
reef ridge
#

-constructing any elements in a subspace using addition and scalar multiplication
-linear independence?

wintry steppe
#

yes

#

(the first is called spanning)

reef ridge
#

good to know!

#

do I need to prove they're linearly independent at all

wintry steppe
#

you should

#

it is rather clear that they are

fickle citrus
#

You could always use

wintry steppe
#

but it's worth confirming intuition

reef ridge
#

gotcha

fickle citrus
#

The definition of linear independence

#

@wintry steppe Any thoughts on my questions?

spice storm
#

For this?

fickle citrus
#

Yeah

#

Like if the 2D space has any natural shapes

#

That correspond to the 3D space

#

I mean I just think there should be a better way to visualise things

#

Since it's all low-dimensions

#

I wouldn't try to relate geometries on a higher dimensions. Geometry in higher dimensions are best done with closed form stuff, maybe asymptotic stuff

#

'geometry' being the standard Euclidean one

last gazelle
#

basic question but when I need to find the inverse of a 3x3 matrix i just set up the matrix on one side and a identity matrix on the other side, then i want to put the original matrix in RREF and then any change i make to the original i make to the identity matrix?

steady fiber
#

yes

tame mural
#

Is there such thing as an empty vector, like []?

#

[] + [] = []?

hollow finch
#

the zero vector?

tame mural
#

is that what it's called -_-a?

nocturne jewel
#

no such thing as an empty vector

tame mural
#

I see, thanks

nocturne jewel
#

the 0 vector is just a vector where every entry is 0

#

[0,0,...,0]

hollow finch
#

i said the zero vector because it satisfies v+v=v

little cliff
#

Meow this is a somewhat annoying answer but there is technically such a thing as a zero dimensional vector space that only contains a single point, the origin. In this case if you wanted to write the vector space as R^0 then you might very well write the only element using a list of coordinates of length zero, denoted []

#

And yes it would satisfy [] +[] =[]

tame mural
#

well I'm probably misreading, but I was asking because linear algebra done right has empty lists

native rampart
#

I guess it's supposed to be a zero dimensional vector space

little cliff
#

OK. Yeah there is occasionally a need for the empty list. If you wanted to do an induction on the length of a list, maybe you could use that as the base case. It would also be an annoying exercise in quantifiers and vacuous truth to see whether the empty list is a basis for the zero dimensional vector space.

tame mural
#

I see, thanks

hollow finch
hollow finch
little cliff
#

These pedantic details come up occasionally. Like what is the empty sum of terms, I.e. The sum of an empty list of terms

tame mural
#

strange!

spare tapir
#

Hi guys

#

You just have to export equation

#

And i don't know how to to do that with this equation :/

hollow finch
spare tapir
#

To segregate the X

#

for example

#

from formula XA+B=XB

#

damn

#

this discord

dense thorn
#

why lol

spare tapir
#

Idk

#

That's the task

#

¯_(ツ)_/¯

fallen maple
#

wait why is XA+B=XB?

spare tapir
#

its an equation

#

From there you have to get

fallen maple
#

you need to solve it for given A,B?

spare tapir
#

Yes

#

so from that equation

#

when you segregate X

#

you get XA-XB=-B

#

from that you get

#

X(A-B)=-B

#

That equation you multiply with (A-B) on -1

hollow finch
#

since youre given a specific A and B you can find the inverse of their difference

spare tapir
#

Let me picture it

hollow finch
#

by inverse of their difference i mean inverse of A-B

spare tapir
#

This is what i am talking about

hollow finch
#

yeah that looks fine

#

as long as A-B is invertible

spare tapir
#

ye

#

with this equation

#

But i don't know how

fallen maple
#

guys the sign with subsets in a vector field '<=' , say subsets W1,W2, vector field V, does W1,W2<=V mean that W1 and W2 are subfields of V?

tame mural
#

⊂?

fallen maple
#

no

tame mural
#

∈ ?

fallen maple
#

tame mural
#

I see

fallen maple
#

M_2x2 (F)

#

oh is it subspace?

tame mural
#

u should take picture of text

fallen maple
hollow finch
spare tapir
#

Well

#

I think i solved the math problem

tame mural
#

what was the interpretation of ≤?

fallen maple
#

they don't say ;[

tame mural
#

mmmm lol

#

sad book

spare tapir
#

@hollow finch

#

Can it go this way?

fallen maple
#

i guess i can only assume it's subspace

tame mural
#

but that's such a weird notation

#

i feel it refers to dimension

fallen maple
#

though we haven't learnt about dimensions yet

hollow finch
#

nor can you divide a matrix

spare tapir
#

I give up then

hollow finch
#

what is the matrix equivalent of the number 1

spare tapir
#

You mean I ?

hollow finch
#

yeah

spare tapir
#

one, zero, zero, one

hollow finch
#

the identity matrix yes

spare tapir
hollow finch
#

$Bx-x=Bx-Ix=(B-I)x$

stoic pythonBOT
hollow finch
#

you use this trick all the time when dealing with eigenvectors

spare tapir
#

So

#

When there is nothing beside X

#

I put the Identity

hollow finch
#

yeah

spare tapir
#

Interesting

hollow finch
#

theres nothing stopping you from sticking the identity just about anywhere

#

just like the number 1

spare tapir
#

Yeah

#

But that still doesn't solves my problem 😂

hollow finch
#

it doesnt?

spare tapir
#

Sorry, my head just gonna blow up, im trying to solve this whole day

hollow finch
#

you do the same thing you did for the other problem

spare tapir
#

Yeah

#

Because i don't know how to solve it

#

I mean

#

When i put identity beside X

hollow finch
spare tapir
#

Yeah

#

In the same way i have to solve this one

hollow finch
#

here we have $X(A^{-1}-I)=-I$

stoic pythonBOT
spare tapir
#

yeah

hollow finch
#

what was the next step in the previous problem once you got to this point?

spare tapir
#

Well, i though i have to swipe that $(A{-1}-1)$ to the other side

stoic pythonBOT
spare tapir
#

damn

#

bad signs

hollow finch
#

A^{-1}-I

#

and yeah

spare tapir
#

Well, i though i have to swipe that $(A^{-1}-1)$ to the other side

stoic pythonBOT
hollow finch
#

well I not 1 but yeah go on

spare tapir
#

How I ?

hollow finch
#

we cant subtract a number from a matrix

hollow finch
#

right

#

just replace that 1 with I

spare tapir
#

Ahhhhh

#

Ye

#

But what would be

#

If there was 2

#

beside x?

#

$x*(A^{-1}-2I)$

stoic pythonBOT
spare tapir
#

This ?

hollow finch
#

or wait actually if you had $A^{-1}X-X$ then it would be $A^{-1}X-IX=(A^{-1}-I)X$

stoic pythonBOT
hollow finch
#

order is important

#

but yeah 2I would be the way to do it

spare tapir
#

Alright

#

Oh yes

#

I forgot about the order totally

#

Well

#

from the previous problem i'll get

#

then

#

$(A^{-1}-I)$

stoic pythonBOT
spare tapir
#

$(A^{-1}-I)X$

stoic pythonBOT
spare tapir
#

This one

hollow finch
#

exactly right

spare tapir
#

so it will be

#

$(A^{-1}-I)=-I$

stoic pythonBOT
hollow finch
#

$(A^{-1}-I)X=-I$

stoic pythonBOT
hollow finch
#

dont forget the X

spare tapir
#

sorry

hollow finch
#

but yeah youre on the right track

spare tapir
#

$(A^{-1}-I)X=-I$

stoic pythonBOT
spare tapir
#

And the next step i really don't know what would be

#

Im stuck on this

hollow finch
#

well last time you multiplied by the inverse

#

why not do that here?

spare tapir
#

$(A^{-1}-I)X=-I /*(A^{-1}-I)^{-1}$

stoic pythonBOT
spare tapir
#

Like this

#

?

hollow finch
#

be careful, you cant divide a matrix

spare tapir
#

no no

#

I didn't want to divide

#

I wanted to multiply

#

Both sides

#

$/*(A^{-1}-I)^{-1}$

stoic pythonBOT
hollow finch
#

with matrix multiplication direction really matters

#

$AX=B$

$A^{-1}AX=A^{-1}B$

$X=A^{-1}B$

stoic pythonBOT
hollow finch
#

thats the correct way to do it

spare tapir
#

Yeah

hollow finch
#

$AXA^{-1}\neq X$

stoic pythonBOT
hollow finch
#

unless A is the identity ofc

tame mural
#

it is silly to fight over notation, but I prefer -> direction for multiplication

#

imo it is preferred way in many programming languages to compose functions in that direction

spare tapir
#

Okay

#

so

#

In the end

#

it would be

#

$x=(A^{-1}-I)^{-1}*(-I)$

stoic pythonBOT
hollow finch
#

right

spare tapir
#

damn

#

i feel so smart now

hollow finch
#

haha thats great

spare tapir
#

Thank you Nix

#

You're my life saver

tame mural
#

nao kiss

hollow finch
#

np my dude catthumbsup

slate fox
#

p^2n choices for each entry and 4 entries so shouldnt it be (p^2n)^4?

quartz compass
#

no you only put scalars in the entries of a matrix, not vectors

#

you have p^n choices for each of the 4 entries

#

so (p^n)^4 in total

slate fox
#

even tho its from F^2 to F^2?

quartz compass
#

2x2 matrices represent maps from F^2 to F^2

#

mxn matrices represent maps from F^n to F^m

slate fox
#

hmm

#

oh right

#

duh

quartz compass
#

👍

slate fox
#

i need to read up on why that works

#

but thank you

wintry steppe
#

did i see

#

diagonalization

hollow finch
#

who doesnt love themselves some good ol' fashioned diagonalization?

little frigate
#

So

#

I am being asked to find the basis for the vector space of all the diagonal 2x2 matrices

#

from a geometric standpoint, I already know that the answer is the following

#

I know because of the visual geometric meaning of what it implies

#

but I just don't know how I could find this result algebraically

#

that's sort of what I've tried to do so I ended up with two 2x2 matrices like this

#

but there are like four variables

#

oh shit

stoic pythonBOT
little frigate
#

Thanks

#

i think I've got it

hollow finch
#

@little frigate if youre just looking for a basis, then the method that slim is suggesting is definitely the best way. write a generic vector in the space and then split that vector up into a linear combination of simple vectors (by each parameter should always work).

little frigate
#

yep that's what i'm currently doing

#

im too dumb. idk what to do afterwards @hollow finch

hollow finch
#

hmmm

#

dont overcomplicate it

#

the ks outside of your matrices are unnecessary

little frigate
#

oh

#

but isnt it a linear combination

hollow finch
#

instead, pull out a and b 🙂

#

theyre your arbitrary constants

little frigate
#

alrighty

hollow finch
#

and once you get to that point... well youre done

#

you showed that ANY diagonal 2x2 matrix can be written as a linear combination of those two matrices

#

sounds like a basis to me 👀

little frigate
#

-a/b = y/x

hollow finch
#

wdym?

little frigate
#

my phone wifi so bad it takes years to send a single picture o_o

#

Yea

#

ive done that

#

i just removed the ks

#

o_O?

hollow finch
#

you showed that ANY diagonal 2x2 matrix can be written as a linear combination of those two matrices
therefore you have your basis

#

finding a single basis for a subspace/vector space should be really easy. it only gets complicated if you want them to be orthogonal/orthonormal but thats for later in the course, i assume

little frigate
#

oh

#

so they don't have to even be orthogonal o_o

hollow finch
#

nope

little frigate
#

how can they be linearly independent if they are not orthogonal then

#

it just doesn't make sense to me idk

hollow finch
#

hm well what is the definition of being linearly independent?

little frigate
#

doesn't it have something to do with the trivial solution

hollow finch
#

indeed it does

#

there are a couple ways to say it of course. this isnt the definition but a way to think about it: none of the vectors can be written as a linear combination of the others.

little frigate
#

ah ok

hollow finch
#

but it is a hugely important concept to have down

#

i would definitely review the definition

little frigate
#

oh boy

#

im seriously overcomplicating this

hollow finch
#

haha

#

yeah i would say so

little frigate
#

so like I just show that

#

can be written as a sum of two matrices

#

and then i somehow pull out a and b?

hollow finch
#

well thats a property of matrices isnt it? if every entry is a scalar multiple of (lets say) k, then you can pull it out of the matrix

little frigate
#

oh

#

yes you are right

hollow finch
#

its just like if we were finding a basis of R^2:
(a,b)=a(1,0)+b(0,1)
therefore a basis of R^2 is {(1,0),(0,1)}

#

in fact, none of the steps there are different from what you are trying to do here

little frigate
#

so if I exactly reproduce your step, finding a basis for the concerned vector space would be:

#

(a,b) = a(1,0,0,0) + b(0,0,0,1)
therefore basis would be {(1,0,0,0},{0,0,0,1)}

#

?

hollow finch
#

well they would all have to be matrices

little frigate
#

wtf it worked

hollow finch
#

but yeah

little frigate
#

but i wrote something different before and it also worked

hollow finch
#

yes

#

its actually stupidly easy to come up with a basis

#

if you make something up chances are it will work

#

not always of course

#

but most of the time

little frigate
#

oh what the hell jesus i am stupid

#

thats the basis that i wrote before

#

(1,1) and (-1,1) and it worked

#

so there was something even simpler

#

🤦‍♂️

#

tyvm for your patience

hollow finch
#

the benefit to having the basis $$B=\left{\begin{bmatrix}1&0\0&0\end{bmatrix},\begin{bmatrix}0&0\0&1\end{bmatrix}\right}$$
is that the coordinate vector for $\begin{bmatrix}a&0\0&b\end{bmatrix}$ with respect to this basis is simply $(a,b)$

stoic pythonBOT
hollow finch
#

and that is naturally how we would communicate the matrix to each other

#

if i describe that matrix by saying "diagonal matrix a b" you know exactly what matrix im referring to

#

if the basis was the first image you sent then the coordinate vector would require a bit of work to find

#

simple bases are very nice 🙂

wintry steppe
#

Gotcha

fallen karma
#

What's a particularly interesting example of a linear functional whose domain is the vector space of continuous real valued functions on [0,1]?

native rampart
#

L(f)=$\int_{0}^{1}f(x) dx$

stoic pythonBOT
wintry steppe
#

evaluation at a point

gray dust
wintry steppe
#

How do you prove that every list of vectors in V containing the 0 vector is linearly dependent?

dusky epoch
#

theres an obvious nontrivial linear combination that sums to zero

#

so, you prove it by definition of linear dependence

wintry steppe
#

No but like consider a list V_1, V_2, ..., V_n

#

Suppose V_2, ..., V_n are linearly independent

#

And V_1 = 0

#

Then, there is no way that a_2V_2 + ... + a_nV_n = 0 if not all a = 0

dusky epoch
#

but you're not talking about the list {V_2, V_3, ..., V_n}

wintry steppe
#

But notice, we can add the 0 vector to both sides

dusky epoch
#

you're talking about the list {0, V_2, V_3, ..., V_n}

wintry steppe
#

So a_1V_1 + ... a_nV_n = 0

#

And this is still a true statement

#

That it can only be written in that way if all of a_i = 0, since V_1 doesn't change the value

dusky epoch
#

no

#

not a true statement

wintry steppe
#

It is

dusky epoch
#

"not all a = 0" covers a_2 through a_n

#

not a_1

wintry steppe
#

But it disappears.....

#

You can add 0 to anything

dusky epoch
#

yes and the zero vector scaled by any scalar is still zero

#

you dont care about the LIness of all the other vectors in your list.

#

the obvious nontrivial linear combination i was talking about is: assign a coefficient of 1 to the zero vector, and 0 to everyone else

#

1v_1 + 0v_2 + 0v_3 + ... + 0v_n = 0

wintry steppe
#

Yeah ok, I was just confused since 1v_1 = 0

#

So what we really have is

#

0v_2 + ... + 0v_n = 0

dusky epoch
#

what we """really have""" is 0 = 0

#

if you insist on striking out all the zero terms in the sum

#

the obvious nontrivial linear combination i was talking about is: assign a coefficient of 1 to the zero vector, and 0 to everyone else

#

these coefficients clearly aren't all zero, unless you reject the existence of 1

wintry steppe
#

Okay

#

Thanks

tropic trail
#

I don't know if someone can explain me how to handle this problem: Given a linear transformation, make an orthonormal basis alpha such that the transformation matrix with respect to alpha is diagonal. I think you need to choose alpha with basisvectors the eigenvectors (of what exactly i don't know) such that the transformation matrix has the eigenvalues on its diagonal (then it is diagonal). Thanks in advance!

lucid cedar
#

i have a 4x4 matrix that reduces to the 4x4 identity and Im only finding 3 generalized eigenvectors

native rampart
slate fox
#

Let F be a field and n a positive integer. Let W ⊂ Mn×n(F) be the subset of skewsymmetric matrices. Show that W is a subspace. Find a basis for W and compute its dimension.(discuss the cases char(F) 6=/= 2 and char(F) = 2 separately).

#

I managed to find basis for 2x2 and 3x3 matrices, but how do i do it for a general n?

#

also not sure how the char of F will affect it