#linear-algebra
2 messages · Page 153 of 1
TheDon
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
Yup it checks out
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
u p much figured it out
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..
Where's the problem?
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
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
@west spade can you assist me here? or <@&286206848099549185>
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 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.
yeah, so my solution doesn't work
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
because T(3x+2) and T(3x+3) can both be in the Kernel since for x=0 T(3x+2) = 0
Looks like it.
It feels impossible
lol yea
f(x) = p(x) + c
I need that T(f(x)) != T(p(x))
for all c != 0
If we need KerT = {0}, then we need for the transformation to only map to zero when p(x) = 0
yea
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
Show that non zero vectors map to non zero vectors
So the only vector that maps to 0 is 0
U is a subset of V but it's not all p(x) in V such that p(0) = 0
oh nvm
p(x) in V s.t p(0) = 0
if T maps from V into U it's got to be.
Right
So if p(0) != 0
it's in the kernel
which is a problem
think about it like that
how do you conclude that part
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?
V isn’t part of the input space at all
wdym
You’re confusing T with these polynomials
They don't map into the kernel
Inputting numbers into polynomials is a total red herring
The kernel is the zero polynomial; the polynomial that is zero everywhere
What matters is inputting vectors (polynomials in this case) into T
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
T(3x+2) = g(x). g(0) = 0. the resultant polynomial T(3x+2) = g(x) = 0 for all values of x.
if you can show that g(x) = 0 for all values of x then 3x+2 is in the kernel.
Then continue
The kernel is the set of vectors in V such that T(p(x)) = g(x) = 0 for all values of x.
yeah
g(x) = O(x) where O(x) = 0 for all values of x.
So
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.
Cool, I couldn't tell if I was reiterating something you already understood.
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
Worry about the linear stuff later. Can you find a bijection at all?
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
Why is that not bijective?
"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.
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
x isn't a number
Note that x is an element of your space and, in this context, isn't a placeholder and doesn't take a value
I may be misunderstanding then
Mind you, your start is good
I think I see where this is going but I'm just observing lol
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
The big issue here is what the 0 means in "p(x)=0" or "{0}"
And what x means too I guess
You had that right before
The elements of the vector space V are polynomials, so try not writing them with function notation
That's...only works because we have the reals R
Yeah, we're over R here
The only polynomial that counts as 0 is the polynomial f(x) = 0
xp(x) can never be 0, unless p(x) was itself
How did you come to that?
I can see how for all x except for x = 0 you're forced to conclude that p(x) = 0.
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.
But how do you know that p(0) = 0
I share this
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.
The function notation p(x) really gets in the way here in some sense
Much like 1 is an element of R
I c kind of.
That's different, haha. So U is the space that IF THEY WERE FUNCTIONS ALL OF A SUDDEN,
p(0) = 0
ohhhh
I get the confusion haha
Basically the "such that" is just completely unrelated
They could have written U as "the polynomials with a0=0" or similar
Mind you, this idea works really well because p(0) = 0 does happen to define a vector space
Yeah, I'm confused about what I'm working with
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"
With normal vectors, T(v) = u
what in my case are the elements? I treated them like functions
like T(f(x))
The elements of V are like finite lists of coefficients that we happen to write next to symbols like x^5.
So T(3x+2) = 3x^2 + 2x for example
my element in the kernel is (3x+2)
That's not in the kernel since 3x^2+2x+0 is not the same polynomial as 0
It's a quadratic, for instance.
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?
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"
so if T(3x + 2) = 3x^2 + 2x
it is not in the Kernel
Alright, so let me try this again better equipped
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
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?
I tried using this everywhere, did I do it correctly?
" 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
I need it to satisfy for all x's, not just x=0? I feel like this is exactly where I said it fell earlier
I feel like what you've said in response to this applies...?
No need to state "for all x" imo it's obvious when the zero vector has to be p(x) = 0
"for all x" clarifies against the confusion of a particular x blackmamba had before
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
I used T(0) = 0 for all linear transformations
Mb I misunderstood haha
so no need to even explicitly state it
" => 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"
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 =>
I was responding to "I need it to satisfy for all x's, not just x=0?" and saying "yes", basically
I'm trying to prove that T(p(x)) = 0 means that for my specific function, the only solution is the zero polynom
oh
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
I don't think it's "an implied understanding", I think the problem is asking for the person to prove that
Ok
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
It is, haha. Continue to develop it.
Σ a_n x^n
Is a useful form here
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
Mind you, you're pretty much done. Get the injective layed out correctly and that's really it
Oop, I thought for some reason you already got surjective
No. For example, R->R^2 by sending t to (t,0). It's not bijective
Injective (with the kernel stuff, say) and surjective
"So I proved injective" not in this chat, but if you finished it elsewhere, good work
in fact ker={0} iff injective
yeah
You had a proposed proof, and I said you need more justification for " x*p(x) = 0 for all X => p(x) = 0"
Yes. But you should run through
Σ a_n x^n
To really do it
hmm
yo just a small question. whats the circle between g and f mean
composition
Because you're correct,
Tp = 0 iff p = 0
isn't obvious
I mean it is, but put your brain on the paper lol
So, I don't really understand why "for all X" is incorrect?
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.
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
hmm
Kind of feels doomed then
if p(0) = 17 then it's not the zero polynom, and KerT isn't just 0
p(0) = 17 fails to be a vector space
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"
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
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)
You want to prove that
IF xp(x) = 0
THEN p(x) = 0
Note that, in this context, a polynomial only equals zero when that polynomial is the zero polynomial
I'm getting conflicting suggestions here..
"You want to prove that
IF p(x) = 0
THEN xp(x) = 0"
What? No! That was already done and obvious
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
I have to go. Good luck!
so I need to prove it despite that fact
that p(x) = 0
thanks @stiff frost
have a good one
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
dirib told me my proof is incomplete the way it was... so I don't understand how to fix it lol
😦
Your proof is logically right, but isn't rigorous
I have a feeling it's not even logically correct tbh
Show that
If p is not the zero poly
Then xp isn't either
The contrapositive, as dirib suggested
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
Why?
because think about it outside of the context here, just through logic
Hi, does anyone know how to quickly/simply find the rank of a matrix
Yaya, the logic is good. But on your paper you'll want to prove this
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
🙏🙏
^I'm trying to follow this here
yeah I get that
but I'm trying to prove that p(x) is indeed the zero polynomial
it has the same flaw
OK
Can someone help me pls?
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
this actually does work though
You don't care about when the polynomial evaluates to 0, you care about when the polynomial is the zero polynomial
I don't understand this
I'm trying to prove p(x) is the zero polynom
right?
I don't know it is the zero polynom
Oh
That's an interesting point haha
But there doesn't exist a poly where this can happen
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)
Nuu too complicated.
Consider p(x) = Σ axⁿ
is not the zero poly.
What's Tp?
how do you know >_>
hmm I guess continuity is an option
all polynomials are continuous ?
yes
$T(p) = \sum a_nx^{n+1}$
Kaynex, the Amateur
Now, that's only the zero poly if a_n is zero for all n
yeah but it's not the original p anymore
Which means that p(x) would have been the 0 poly
even if all a_n are 0 there's still a0
also
when x=0
none of these have to be zero
a0 is an a_n
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
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
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?
Like, x² and x are different elements of R[x]
Despite both of them evaluating to 0 for x = 0
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
Just checking in. blackmamba's current thoughts are one of the three ways I was thinking of
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
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)
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
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 😢
I wrote it non-explicit, does that look ok?
Let T(p(x)) = 0
assume by contradiction that p(x) isn't the zero polynomial, thus T(p(x)) = x*p(x) != 0 for some x, which contradicts that T(p(x)) = 0, thus p(x) must be the zero polynomial
That would work (though you can simplify the language using a contrapositive). But you'll have to prove it
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
Yeah that works!
thanks a lot!! @half ice @stiff frost @wintry steppe
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}$
UnknownError
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
Based off looking at a C++ implementation on how to do what I am asking for with a 4x4 matrix in the GLM library: https://github.com/g-truc/glm/blob/master/glm/gtx/matrix_decompose.inl#L32
so are you assuming the matrix represents something of the form, rotation + translation + scale?
Yes, in 2D space.
you need to define which order they're done
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)
i assume ur talking about these things
Yes, I am
This is an interesting point. Yea, the order of operation I would eventually like, would be scale -> rotation -> translation.
i think saccharine is referring to order of rotation in 3D
So that translation is based off the scale and rotation
no I'm referring to the order in which you do the operations
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
hmm, what ambiguity is there with a transformation like $\begin{bmatrix} r\cos \theta & -r\sin \theta & t_x \ r \sin \theta & \cos \theta & t_y \ 0&0&1 \end{bmatrix}$
kxrider
r is amount scaled and (tx, ty) is translation, and theta is angle of rotation
Shouldn't the scale be a vec2?
oh, yea you could apply a scale like that (also, forgot the r on the cosine in the 2, 2 entry lol)
@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
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))$
UnknownError
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
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))andarcsin(b/sqrt(a^2 + b^2)).
How did you mean to combine these calculations to get a more precise angle?
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)
Alright. Yea. The divide by zero case for atan2
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
Sorry, yea, atan(-x / -y) would be the same as atan(x / y) even though they are in different directions
yep
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))?
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}$
kxrider
Sorry for the late reply. Yea, shear isn't really something that I plan on using, but I wanted to address it just in case I use it in the future.
Applying a shear to the matrix is apparently:
$\begin{bmatrix} 1 & a & 0 \ 0 & 1 & 0 \ 0 & 0 & 1 \end{bmatrix}$
you need two backslashes for a newline
UnknownError
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}$
UnknownError
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.
kxrider
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} $$
UnknownError
I believe this would throw a monkey wrench into the equations we were using to derive rotation and scale.
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.
kxrider
Ah, so tau would be foiled distributed into many places into the resulting matrix
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
"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
The math I have been using comes from sources like: https://people.gnome.org/~mathieu/libart/libart-affine-transformation-matrices.html#:~:text=The Affine transforms are represented,and a 3x1 Point vector.
Or are you considering shear to be a special class of transformations?
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
roger
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...
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?
yes, that looks right
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}
$$
UnknownError
is the second thing really a shear?
Which I think equals a google search to find a pharmacy
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
Yea, I think I am getting ahead of myself and attempting to cheat at math
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
Well, unfortunately, if you do a translate #1 -> rotate -> translate #2. That isn't the same thing as translate = translate#1 + translate#2
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
Oh, yea. and I messed up the signs
basically, its all wrong except the first one :p
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}
$$
UnknownError
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"
$$
\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}
$$
UnknownError
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()"
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?
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}
$$
UnknownError
The interior 2x2 is a bit of a cluster truck.
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
can you be more specific about what you're trying to do?
$\lambda$
parallel TTransport
if theres no quadratic term for the characteristic polynomial of a 3x3 matrix, then the eigenvalues sum to zero
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
ok so basically im trying to find the eigenvalues of a 3x3 matrix and i got
$\lambda$^3 - 21$\lambda$ + 106
Sulima1
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
Sulima1
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
nix
uh yeah but why
thats the only way i could think of solving for lamba
lambda
im not very good at math
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
what does that tell me
well cubics with real coefficients have at least one real root. but i don't think thats particularly helpful
is the only way to go about this the rational root theorem?
what is the determinant of the matix just checking
20
then i know you did not calculate the characteristic polynomial correctly
what is the trace of the matrix
(sum of the diagonal entries)
0
okay so the quadratic term is correct
would you mind posting a picture of the matrix itself?
so i should redo
its a homework problem so idk how far you could help me
bc of server rules
ok cool
i probably made a small mistake while getting my polynomial
or big one...
it happens
it was small
calculating that big ugly determinant is kind of a grueling task
yeeeppp
so we want 3 numbers which add up to zero and multiply to 20
yeah
ah i didnt know you could find them like that
yep!
its not always super fast for 3x3s but sometimes you get lucky and you can guess them right away
-4, 5, -1?
actually yeah thats it
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
yeah thats possible
but if you guess one eigenvalue correctly you can adjust your search
how can i tell if my eigenvalue is correct? find the corresponding eigenvector?
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.
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?
Yes
how do i count the number of elements in Hom(F^2,F^2)?
Is there somebody who knows how to do that ?
<@&286206848099549185>
@slate fox so, you're just trying to count how many 2x2 matrices there are with entries in F, this is rather straightforward
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?
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
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?
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 
try to take an arbitrary element of U and write it as a linear combination of "simpler" matrices in U 
of course, not before recalling what a basis is
so something like A or just something with random real numbers
A
looks good so far
,rotate
well you can simplify what you have in your picture more
no
ah sorry
in each of your matrices the only entries are all the same
so maybe you can pull the scalars out 
ohhh
so would these matrices with the scalar taken out be the basis then?
or is there more to be done
this is the case, but you should write full justification as to why
you've basically already showed that they give you a spanning set for U
and there's one other condition for forming a basis
because you could construct an element of U by adding and scalar multiplying them?
the dimension of U? That's the number of elements in the basis, right?
what are the two conditions for a basis?
-constructing any elements in a subspace using addition and scalar multiplication
-linear independence?
You could always use
but it's worth confirming intuition
gotcha
The definition of linear independence
@wintry steppe Any thoughts on my questions?
For this?
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
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?
yes
the zero vector?
is that what it's called -_-a?
no such thing as an empty vector
I see, thanks
i said the zero vector because it satisfies v+v=v
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 [] +[] =[]
well I'm probably misreading, but I was asking because linear algebra done right has empty lists
I guess it's supposed to be a zero dimensional vector space
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.
I see, thanks
row reducing [A|I]->[I|A^-1] is a general method and imo best for large matrices (4x4 and up), but the fastest general way for a 3x3 inverse is using the adjoint or adjugate. with some practice you can do it entirely in your head/without scratchwork one entry at a time.
i thought the zero vector space was zero dimensional
These pedantic details come up occasionally. Like what is the empty sum of terms, I.e. The sum of an empty list of terms
strange!
Hi guys
Is there any expert here that can explain third task to me ?
You just have to export equation
And i don't know how to to do that with this equation :/
i don't quite understand what it's asking
why lol
wait why is XA+B=XB?
you need to solve it for given A,B?
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
since youre given a specific A and B you can find the inverse of their difference
Let me picture it
by inverse of their difference i mean inverse of A-B
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?
⊂?
no
∈ ?
≤
I see
u should take picture of text
top right and left side are given, need to prove bottom right
what's the issue?
what was the interpretation of ≤?
they don't say ;[
i guess i can only assume it's subspace
though we haven't learnt about dimensions yet
no you cant subtract the number 1 from a matrix
nor can you divide a matrix
I give up then
what is the matrix equivalent of the number 1
You mean I ?
yeah
one, zero, zero, one
the identity matrix yes
$Bx-x=Bx-Ix=(B-I)x$
nix
you use this trick all the time when dealing with eigenvectors
yeah
Interesting
theres nothing stopping you from sticking the identity just about anywhere
just like the number 1
it doesnt?
Sorry, my head just gonna blow up, im trying to solve this whole day
you do the same thing you did for the other problem
here we have $X(A^{-1}-I)=-I$
nix
yeah
what was the next step in the previous problem once you got to this point?
Well, i though i have to swipe that $(A{-1}-1)$ to the other side
Steva
Well, i though i have to swipe that $(A^{-1}-1)$ to the other side
Steva
well I not 1 but yeah go on
How I ?
we cant subtract a number from a matrix
Steva
This ?
or wait actually if you had $A^{-1}X-X$ then it would be $A^{-1}X-IX=(A^{-1}-I)X$
nix
Alright
Oh yes
I forgot about the order totally
Well
from the previous problem i'll get
then
$(A^{-1}-I)$
Steva
$(A^{-1}-I)X$
Steva
This one
exactly right
Steva
$(A^{-1}-I)X=-I$
nix
dont forget the X
sorry
but yeah youre on the right track
$(A^{-1}-I)X=-I$
Steva
$(A^{-1}-I)X=-I /*(A^{-1}-I)^{-1}$
Steva
be careful, you cant divide a matrix
no no
I didn't want to divide
I wanted to multiply
Both sides
$/*(A^{-1}-I)^{-1}$
Steva
with matrix multiplication direction really matters
$AX=B$
$A^{-1}AX=A^{-1}B$
$X=A^{-1}B$
nix
thats the correct way to do it
Yeah
$AXA^{-1}\neq X$
nix
unless A is the identity ofc
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
Steva
right
haha thats great
nao kiss
np my dude 
i dont understand, why would it be p^4n?
p^2n choices for each entry and 4 entries so shouldnt it be (p^2n)^4?
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
even tho its from F^2 to F^2?
2x2 matrices represent maps from F^2 to F^2
mxn matrices represent maps from F^n to F^m
👍
who doesnt love themselves some good ol' fashioned diagonalization?
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
slimvesus
@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).
yep that's what i'm currently doing
im too dumb. idk what to do afterwards @hollow finch
alrighty
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 👀
-a/b = y/x
wdym?
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?
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
nope
how can they be linearly independent if they are not orthogonal then
it just doesn't make sense to me idk
hm well what is the definition of being linearly independent?
doesn't it have something to do with the trivial solution
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.
ah ok
but it is a hugely important concept to have down
i would definitely review the definition
so like I just show that
can be written as a sum of two matrices
and then i somehow pull out a and b?
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
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
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)}
?
well they would all have to be matrices
wtf it worked
but yeah
but i wrote something different before and it also worked
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
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
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)$
nix
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 🙂
Gotcha
What's a particularly interesting example of a linear functional whose domain is the vector space of continuous real valued functions on [0,1]?
L(f)=$\int_{0}^{1}f(x) dx$
DrunkenDrake

How do you prove that every list of vectors in V containing the 0 vector is linearly dependent?
theres an obvious nontrivial linear combination that sums to zero
so, you prove it by definition of linear dependence
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
but you're not talking about the list {V_2, V_3, ..., V_n}
But notice, we can add the 0 vector to both sides
you're talking about the list {0, V_2, V_3, ..., V_n}
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
It is
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
Yeah ok, I was just confused since 1v_1 = 0
So what we really have is
0v_2 + ... + 0v_n = 0
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
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!
I will include the given linear transformation, if someone want to try it out
i have a 4x4 matrix that reduces to the 4x4 identity and Im only finding 3 generalized eigenvectors
I don't think that works for an arbitrary linear operator
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
