#linear-algebra
2 messages · Page 67 of 1
Ive never did something like that
Good to know, thank you very much guys! @vast torrent @sonic osprey
@wintry steppe for future reference don't double post
@gray dust
Sorry, i dont know whats the dofference between linearalgebra and the questions section...
Can i ask questions in #linear-algebra or is it just for discussions and all questions need to be posted here?
diff..*
if you know what topic your question belongs to, you should post in the related channel (so yes linalg q's go to #linear-algebra). the question channels are for if you don't know where your q belongs or if the related channel is currently occupied
@gray dust
Gotcha, won't do it again, thanks!
yep 
where am i going wrong wtf
first column of the B matrix is the coordinate vector of T(v1), where v1 is the first element of the basis
T(t^2) = 4 - 6t + 3t^2
ohhh
3t^2 - 6t + 4
$\pdv{u}{x} = \pdv{u}{\xi} \pdv{\xi}{x} + \pdv{u}{\eta} \pdv{\eta}{x} = \pdv{u}{\xi} + \pdv{u}{\eta}$
Ann:
$\pdv{u}{y} = \pdv{u}{\xi} \pdv{\xi}{y} + \pdv{u}{\eta} \pdv{\eta}{y} = a\pdv{u}{\xi} + b\pdv{u}{\eta}$
Ann:
I dont know how you got that
multivar chain rule
I thought x had to be dependent on E for chain rule to work
what's E
The weird E
Ann:
$\eta$ is "eta"
Ann:
Ah, thanks i will try and solve it now
u = u(xi, eta) = u(xi(x,y), eta(x,y))
bc you're making a change of variables
so you want to express u as a function of xi and eta
your new vars
So rearrange to x = xi - ay?
no you don't need to do that
I cant see how you merged them together
Ok, thank you
given a subset - does it have to include the zero vector in order to be a subspace?
suppose i have:
$ \mathbb{W} \subseteq \mathbb{R}^4$
is $W = \{(a b c d)| a^2 + b^2 + c^2 + d^2 > 0 \}$ a subspace?
nxue:
(a b c d)* ...
given a subset - does it have to include the zero vector in order to be a subspace?
yes it does, otherwise it'll fail to be closed under addition guaranteed
or under scaling
because in this subset - i could do
0 0 0 0 + 0 0 0 0 and it would be = to 0 0 0 0 which is not in the subset because 0^2 + 0^2 ... is not > 0 , right? @dusky epoch
the zero vector isn't in your subset
it's literally the only vector you're excluding
yes i know so it lacks the zero vector and its not a subspace but i need to circle only one option- i have:
not a subspace because it lacks closure to addition /
scalar multiplication / both
@dusky epoch
so if it does not have the zero vector ---> it lacks closure to addition?
if it doesn't have the zero vector it's always guaranteed to lack closure under scaling bc 0v = 0
in this particular case your subset also lacks closure under addition because you can take any nonzero vector v and write v + (-v) = 0 because -v isn't zero either and so is in your subset
Any good material on tensor product, tensor dot product and tensor double dot product?
Let $V$ be a $K$-vectorspace and $F:V \to V$ be a linear transformation with $F^2=-F$. Show that $V=Ker(F) \oplus Im(F)$. $\$ proof: "$\subseteq$" Let $x \in V$. We have two cases to look at: $\$ 1.case: $F(x)=0 \implies x \in Ker(F)$ and since we know that $0 \in Im(F)$ we know that $x = x+0 \in Ker(F) \oplus Im(F)$. $\$ 2.case: $F(x)=w \neq 0$ $\ \iff F^2(x)=F(w) \ \iff -F(x) = F(w) \ \iff F(w+x) = 0 \implies w+x \in Ker(F \circ F) \supseteq Ker(F)$ (proven in another exercise). We also know $w \in Im(F) \implies -w \in Im(F)$ (since Im(F) is a subspace of V). Thus we know $x \in Ker(F) \oplus Im(F)$ in all cases.
Is this correct so far?
Nabil | GMT+1:
I don't understand why you need to invoke the $\text{Ker}(F^2)$, I mean, you have that $F(w+x)=0$ so $w+x\in\text{Ker}(F)$ and since $w\in\text{Im}(F)$, we have that $x=x+w+(-w)\in\text{Ker}(F)\oplus\text{Im}(F)$.
jnkena:
I just wrote that since I used F twice but yea it is trivial that is right
since we know $ker(F^2) = ker(F)$ we know that Im F $\cap$ Ker F = $\lbrace 0 \rbrace$
Nabil | GMT+1:
Your proof is correct as I see it
thank you for the input 🙂
hi i need to prove/disprove this statement:
if L1 is an eigenvalue of matrix A and L2 is an eigenvalue of matrix B
then L1*L2 is an eigenvalue of at least one of these matrices: AB , BA
i dunno where to even start :(
Well you agree it's definitely true if AB or BA share an eigenvector of A and B, right?
how do we know this?
Write out the definition of eigenvalue and eigenvector
of I mean, yeah sure if they share an eigenvector, but what if not ?
we agreed that if AB and BA share an eigenvector with A and B it's true, but that's not the proof in fact i think it's not part of it
@wintry steppe i found online that the answer is false. You just need a counterexample where the eigenspaces don't share a common vector
So just experiment with 2x2s
I searched online bc i couldn't think of any reason why the statement should be true if the matrices considered don't share eigenvectors
And i didn't feel like trying to make a counterexample
It shouldn't be too hard because
Most matrices don't share eigenvectors
So most ones you try should work
Btw my tutor taught me a trick in creating counterexamples
Want to hear
@wintry steppe he said
Fix most of the entries as constants, 0, 1,-1
And then you can vary one or two entries
By introducing a parameter t
And then after you matrix multiply
If you didn't find your counterexample
You can vary the parameter without having to multiply the matrices together each time
Need help with this proof:
Let V be a complex vector space, p be a polynomial with complex coefficients, and T:V->V a linear transformation. Prove that a complex number a is an eigenvalue of p(T) then a=p(λ) for some eigenvalue λ of T
Yeah
Um
If p=a_0-a+a_1x+...+a_nx^n, then we can find a root
then is this root an eigenvalue of T
just my wild guess

I think you'll have to do that, since the next exercise says
Show that this is not true of V is a real vector space

and all C is replaced with R
Got it @dusky epoch
Btw if you're interested ig, the example I gave was
V=R^2, T(x,y)=(-2y,x), p(z)=z^2+1, then -1 is an eigenvalue for p(T), but obviously no real value of λ satisfy p(λ)=-1
Guys, on matrixes ( A + B ) ^-1 equals A^-1 + B^-1?
if they're equal, you can multiply both sides by (A+B) and get the identity
What?
I'm saying assume it
for the sake of contradiction
there are other ways, take B=0
(A+B) is invertible but B isn't so it doesn't make sense
basically i want to proove this
if i can multiply them seperately with -1
then its easy
left side is A + B
and right side is also A + B
also I^-1 equals I?
well verify it
how do inverses work
inverse is the ^-1?
yes, but what is its defination
for this problem you need this information:
yeah, its like power series
and like no where on my notes i wrote about A^2 , A^3 etc
Suppose $A$ and $B$ are square matrices of the same dimention, and are invertible. Denote the inverse $A^{-1}$ and $B^{-1}$. what is the inverse $AB$
JohnDoeSmith:
what?
umm, it just means im naming the inverses that
if what you are asking is what AB^-1 gives its B^-1*A^-1
yeah
good
Now can you use this information on the problem u sent
the first one lol
the one u posted like, 5 mins ago?
ok well then
yeah lol
anyhow
just use the defination of an inverse
i.e do they multiply to the identity
identity is I?
yeah
paranthesis pls
I seriously doubt you solved those previous problems
Its so funny whenever i have questions in math
JohnDoeSmith:
@torn hornet You gotta be shittin me. those 2 are unequal?
yeah I'm positive he did something illegal to find the inverse of A^{-1} + B^{-1}
I asked before if those are equal and i was getting philosophical responses so i guessed they are
wew
yeah i guess its wrong
don't guess, prove
he did not give u philosophical responses mate, he told u the reasoning as to why its false
which you should pay attention to
well tbh on my notes nowere i see those e2 being equal so yeah
JohnDoeSmith:
this fact should be how you do all problems
but youre assuming
assuming what?
if B = A^-1
not even a nitpick
Honestly you dont get how hard is to understand the math terms youre saying which i do them in another language
english aint my first langauge either
listen. if $A$ is invertible, ie $A\inv$ exists, by definition $A\inv A=AA\inv=I$
yes but i dont do english terms at all. What does that has to do with what im saying
@gray dust yes we are aware of what you sent
RokettoJanpu:
ok but do you understand this defination
no wait
john just said "let B be the inverse of A" so that he didn't have to keep typing A^-1
oh okay. I didnt understand thats what you meant
anyhow moving on
apply this defination to prove things right
first i want you to understand this properly
i understood it
so i said $(A+B)^{-1}\neq A^{-1}+B^{-1}$
JohnDoeSmith:
ok
defination?
defination of inverses that is
definition 
bruh
the unequality?
yes
it makes sense since on the left part you add 2 matrixes then you find the inverse of that lets say C matrix where on the right side you find the inverse of both A and B then add them so it will be a different result
i mean intuition is good, but lemme just right this out for you
write 
If it were true, i.e $(A+B)^{-1}=A^{-1}+B^{-1}$, then by definition of inverse $(A+B)(A^{-1}+B^{-1})=I$, but this expands to $2I+AB^{-1}+BA^{-1}=I$, which is clearly not always true
JohnDoeSmith:
i see
in your problem, you have $(I-A)^{-1}=I+A+A^2+A^3$. can you use the definition of an inverse here
JohnDoeSmith:
umm
We are saying the inverse of I-A is I+A+A^2+A^3 yeah
so i multiply left side with (I-A)?
yes
no
there are non-zero matrices whose powers can be zero
oh i see
$A=\begin{pmatrix} 0 &0 \ 1 & 0 \end{pmatrix}$, whats $A^2$
then how does A^4 = 0 help me
JohnDoeSmith:
its 0
(matrices who hava a power that is 0 are called nilpotent matrices btw)
yep
So since (I+A+A^2+A^3)(I-A) is I, I-A and the other thing are inverses
(note just muliplying both sides of the eqn wont prove it)
$-x=x \implies (-x)^2=x^2\implies x^2=x^2 \implies 1=1$
JohnDoeSmith:
does not tell us anything about the validitiy of the first identity does it
whats this
False premises can lead to truths, so showing your identity implies I=I is not a proof
is my poiny
point
oh i see
so instead say that (I-A)(I+A+A^2+A^3)=I, hence these are inverses
so what was the point of telling my to multiply both sides with I - A
i just wanted you to multiply those two things lol
indeed
so (I - A)^-1 = that right side
mhm
ok one down finally
so now
what i did before was wrong
so i cant do anything on left part
lets do what we discussed, try showing multiplying those two is the identity
ok so i multiply both wiith the inverse of the left side
so i get an I on the left side
and right side gives something that doesnt help me
so this one is a bit trickier
wait
with the logic applied
your logic for the previous one is wrong
nvm
the logic on the previous one is correct
remember $(MN)^{-1}=N^{-1}M^{-1}$
JohnDoeSmith:
but we cant apply it here
this will significantly simplify your problem
ye
$[A(A+B)^{-1}B]^{-1}$
JohnDoeSmith:
so its B^-1 + A^-1
exact;y
so basically i prooved
that the inverse of the right side
is equal to the inverse of the left side
thus the normal ones equal as well?
mhm, and inverses are one-to-one so yeah
ah i see. Lovely
i just realised
that probably most of these excersises im not supposed to do them
still good practice
since its first time im seeing them
yeah. But i have like exercices to do with Cola rank nula nullity and stuff like that and then go to calculus to do sequences
anyways if youd be kind to help with the last one
yeah sure
should be
ok done
so inverses are equal with both being B^-1 * A + B^T
so normal ones equal
yep
lovely
btw quick question
is it efficient to use det to find inverse of a table bigger than 2x2?
or should i do the A | I ~ I| A^-1
since they only taught us the det for 2x2 not bigger matrixes
for example for exercises where i just need to tell if a matrix is inverse or not and not to calculate it
it would be way easier to find the det
and see if its != of 0
theres several ways to find inverse, i would say its easier to do the A|I ~ I|A^[-1} by hand
rather than trying to find the inverse table the other way until you find a 0 line
gaussian elimination is usually efficient
somewhere i heard of Gaus i think
gauss is very nice for inversion
though if i see a fair amount of zeros in a row or col then i don't mind taking the minors
If we want to prove the converse of this. Can we say that since for every w that belongs to B we have that w belongs to span then V is subset of span(B). Then since B is a subset of V then span(B) is a subspace of V hence span(B) is a subset of V. Hence the equality
You are trying to prove the following:
If each v in V can be uniquely expressed as a linear combination of vectors in beta, then beta is a basis for V.
Clearly, $L(\beta) \subset V$. Since $v \in V \implies v \in L(\beta)$, it follows that $V \subset L(\beta)$. This proves that $\beta$ spans $V$. Now, you just need to show linear independence.
Now, if we have $a_1u_1+a_2u_2 + .... +a_nu_n = 0$, then $a_1 = a_2 =...=a_n = 0$ certainly satisfies that equality. In fact, they are the unique scalars that satisfy that equality. This proves that $\beta$ is linearly independent. That shows that $\beta$ is a basis for $V$.
Abhijeet Vats:
@solar osprey
thank you dude
Hotaro Oreki from Hyouka
Also, note that equivalences don't have converses. What you meant was the converse of the forward implication.
Let F be a 5 × 5 table whose space produced by its columns is not R5. What can you say about its core?
Can someone help with this one?
what did you translate it from
i'm pretty sure that you meant kernel rather than core
greek
about tis core
i think it means
about the nullspace
the dimension of NulF
correct?
ok if you wanna use the word nullspace so be it
so you have a 5 by 5 matrix whose column space isn't R^5
i.e. whose rank is less than 5
is this channel taken? :v
ok
Translated from Greek 
That is an orthogonal basis
thanks
Now make it an orthonormal basis
problem doesn't say to do that tho does it
lol
no
in order to complete a set of vectors to an orthogonal basis
do i complete to a basis (with the standard basis) and then do gramshmidt ?
i start with one
lol
so basically ye, but what if they arent? i need to do gram shmidt before also
If U is a subspace of V, but U ≠ V. Can it have the same number of dimensions; more specifically, can its basis be the same length?
I’m thinking no
Yeah nvm it’s very clearly no
hey how do you define a line?
If its finite dimensional
dim(U) = dim(V) <=> U = V
How do you define same dimension in infinite dimensional vector space?
The cardinality of the basis?
Also, is orthonormal basis kind of generalization of the standard basis?
Since the vectors are pairwise orthogonal and each has length 1
Yeah cardinality of the basis obviously
Lol saying a generalization of the standard basis is dumb
What does the standard basis for a k dimensional vector space V even mean @pallid rampart
That was what I meant
It doesn't make sense to talk about standard basis
So we have orthonormal basis which is pretty nice to work with
I think it just let's you do geometry
I dont understand how this solution gets -3
Can someone explain please this is determinants
laplace expansion along third row
do the chessboard pattern thingy and you'll find that the 3 in position (3,4) is on a minus square
[ + - + - + ]
[ - + - + - ]
[ + - + - + ]
[ - + - + - ]
[ + - + - + ]
Oh ty
If T has an eigenvalue of multiplicity > 1, does its minimal polynomial necessarily have a repeated root?
no
Lol duh
yeah maybe, the class is abstract linear algebra so could very well be both
ill go there though, more on the abstract algebra side
Not certain on how to approach this, a little guidance or hint would be helpful
you're asked to find θ so you should try to at least make θ appear out of all this info
for example, you can have a look at ||u+v||²
Does this somehow relate to the defenition of dot product?
yes
Oh ok so i can square both sides of eq1 and expand dot product
try it and see if you get somewhere useful
Yeah now i notice for u+v to have same mag as u, v must travell back 2||u|| in opposite dir
Hi can someone please explain how one would find a basis for R3[x] when you have a basis A=2, B=3, C=5, D=-5 of a vector subspace of R3[x]
The vector subspace in this case is U={p(x) € R3[x] | p'(0) = p(1)} and we also know that R3[x] is a vector space of polynomials of max coefficients 3
Quick question: Is a matrix diagonalisable iff it is a normal matrix?
Good question
For this we only need to assume that (e_1,...,e_n) is an orthogonal basis right?
doesn't need to be orthonormal
Oh wait nvm
We need orthonormal
But how should I interpret this theorem?
What's the intuition for inner product?
It's not R^2, it's the subset of R^2 with integer entries
I'm writing a calculator for a factory game, and I need to figure out how I came to an answer so I can abstract it and put it in a program
starting data
The equation on the bottom is correct.
The matrix is an.... attempt.
@real plaza yes
I was just correcting the fact that you said "since R^2 only takes integers"
which is not true
Oh fuq you're playing satisfactory
yeap
What does the answer represent?
what ingredients that iron ingot constitutes
How's update 3? I haven't had much time to play
Sadly representing this with a matrix is eh
A tree is the better way, if that makes any sense
Oh wow that's interesting
What's that on the right? Oil?
Fuel
IC
Pipes btw
What's your goal? Just to reduce everything down to most basic elements?
Yup
Those cycles do screw everything up, as you can arbitrarily waste resources now. You might want to just ignore them
Or come up with a good rule on how they should be used
Which I thought matrix operations could do
But I p much forgot how to matrix
tho this is Haskell so it won't be crazy to define everything from scratch
I mean you could have a massive vector of every product in the game, then creating a product is the same as multiplying that vector by some matrix
sparse matrices
But you're looking to do this backwards, and these matricies won't have inverses lol
Or, they might actually. They'll all be mostly 1
yup
*relearning Haskell after writing almost no code for 2 years
That inverse matrix idea might actually be pretty good, but it still won't really explain how to deal with cycles
Is there a "best strategy" on how to use those alternates?
as in which ones to use and which ones not to?
some people have their rankings
but I was wanting to preserve the alternates data
@coral tinsel
The problem is you're introducing something that isn't invertible into the system. If I gave you my final product, you can't possibly tell me what I started with, because you can't know how many times I used the cyclic alternates
Even if you knew exactly which recipes I used
They incur a fuel cost each iteration
I intend to add energy cost too....
It suddenly feels like the second law of thermodynamics and quantum non-determinacy are involved...
Did I mention that I was going to use RREF?
Can someone check this for me?
What's you justification for the last one
It might be linearly dependent
But I can't see the dependence immediately
And I don't have paper
I said that the last ones are linearly dependent because the amount of vectors is greater then the entries of the vectors
Oh lmoa
True
Yeah
Looks fine
Since the first two are linearly independent
They span R2 and so the third is necessarily in their span and stuff
Ok
Yeah
First 2?
I said the second one is lineraly dependent because in includes the zero vector
Yeah, that's fine
I mean first two vectors in e
Zero vector, you can adjust the coefficients
To satisfy the definition of linear dependence
this all looks fine
OKay thank you. I might come back frequently to have my answers double checked
but it never hurts to also show some work, just in case you get smth wrong and i need to check what you did
Oh yes I will show my work next time
does nayone know min plus algebra
This one
Is pretty easy to check
Just do the multiplication with your result
And see if you get [6, 18]
Yup, I got it
Thanks
This would just be the idenity matrix multiplied by negative 8 right?
don't forget we have rotation by an angle of pi too
The negative does that doesnt it?
Yeah the negative would account for the rotation
you're right it does
Alright, this will be my final question. I was able to reduce this to RREF. I have all 0s in the last row, and ones on the diagonal up top
So its one to one because there is no free variable
And i forgot what onto is
onto <-> surjective
I uh, dont know what that means
I dont think our professor used the term surjective
that's interesting
take a look at the size of A. it tells me that T is a linear map from R^3 to R^4
Right
3 columns 4 rows
So it means that every image is a transformation of a vector?
uhh not sure what you're getting at
Me neither
i mean for any function T, we call T(x) the image of x under T
anyway your rref shows that the columns of A are linearly independent
so the span of A's column vectors which in this case is also the image of T is a 3d subspace in R^4
a 3d hyperplane in 4d space if you like. point is, the dimension of this plane is 1 less than the "ambient" space
Okay but how does that relate to onto
first you'd have to recall what a function's domain and codomain are
as well as what injective/surjective functions are
and you know the difference between codomain & image?
Yeah
say f is a function from X to Y. we say f is surjective aka onto if for all y in Y, there exists at least one x in X such that f(x)=y
$\fxn{f}{\bR}{\bR}{x}{x^2}$
RokettoJanpu:
dom(f) is the set of reals, codom(f) is also the set of reals
we definitely have -1 in codom(f) but there doesn't exist anything in dom(f) that gets mapped to -1
ohhhh i see
RokettoJanpu:
Thats onto because we dont have to worry about the negative numbers
say f is a function from X to Y. we say f is surjective aka onto if for all y in Y, there exists at least one x in X such that f(x)=y
an easier to digest rephrasing of this is, every element in Y is the image (under f) of at least one element in X
But for the example with the matrix wouldnt every Y be an image? I cant really think of a counter example
hold on what's dom(T) and codom(T)?
domain would be R4
co domain would be R3
Wait no
Other way around
Domain would be R3 and co domain would be R4
ok and through RREF you showed that the columns of A are linearly independent
yes
A has 3 lin indep columns so this leads to T's image being a 3d hyperplane in R4
Right
But not every thing in R4 would be something from R3
Right?
I mean what would be a quick way of checking
sure, clearly there exist vectors in R4 that aren't the image of smth in R3 under T
for me it's enough to do the RREF to show A's cols are lin indep thus the dimension of T's image is 3 which is one less than the dimension of codom(T)
So therefore its not onto
T isn't onto
you're welcome 
just post, don't ask for me specifically
oh sorry
but anyways
is y=4x^2 (parabola) considered increasing faster than y=5x+10
?
you should post that in #prealg-and-algebra instead or #precalculus
my bad
no worries
@wintry steppe yeah no
ok thanks
if u say so
well if you were to find the zero matrix of a singular non-zero element that is any given position in any size matrix then you would see to be proven correct
write, say, $\begin{pmatrix}1&0&0\0&0&1\0&1&0\end{pmatrix} = \lambda_1\begin{pmatrix}1\0\0\end{pmatrix} + \lambda_2\begin{pmatrix}0\0\1\end{pmatrix} + \lambda_3\begin{pmatrix}0\1\0\end{pmatrix} = \begin{pmatrix}\lambda_1 \ 0 \ 0\end{pmatrix} + \begin{pmatrix}0\0\\lambda_2\end{pmatrix} + \begin{pmatrix}0\\lambda_3\0\end{pmatrix} = \begin{pmatrix}\lambda_1\\lambda_3\\lambda_2\end{pmatrix}$
Namington:
linear independence should be obvious from here
yeah but this technique generalizes (at least to finite matrices)
just do induction or w/e
theres probably a better way than induction but
idk what you know
I'm confused how to approach 38.2
I understand 38.1 because its the basis vectors which is easy
but I don't understand how to do it when i'm writing it in terms of the basis vectors
you need to solve $\lambda_1 \begin{bmatrix}2\1\end{bmatrix} + \lambda_2 \begin{bmatrix}5\3\end{bmatrix} = \begin{bmatrix}1\0\end{bmatrix}$
Namington:
and similar for $= \begin{bmatrix}0\1\end{bmatrix}$ (but different values of $\lambda_1, \lambda_2$)
Namington:
You have two equations with e_1 and e_2 as unknowns
Yea sure but you could treat them as 'unknowns' and work from the equations in part (i), no?
Like, eliminate e_1, find e_2, then find e_1 using the expression for e_2
oh sure
that definitely works too
in any case, you're just solving a system of linear equations
my technique would just have you write $\lambda_1 \begin{bmatrix}2\1\end{bmatrix} + \lambda_2 \begin{bmatrix}5\3\end{bmatrix} = \begin{bmatrix}2\lambda_1 + 5\lambda_2\\lambda_1 + 3\lambda_2\end{bmatrix} = \begin{bmatrix}1\0\end{bmatrix}$
Namington:
and hence you need to solve the system $2\lambda_1 + 5\lambda_2 = 1, \lambda_1 + 3\lambda_2 = 0$
Namington:
(and then do a similar thing but for [0,1])
but how would I do it with @cursive narwhal method
well i'd probably take $c_2 = 5e_1 + 3e_2$ and subtract $3c_1$ from both sides
Namington:
$c_2 = c_2 - 3c_1 = 5e_1 + 3e_2 - 3c_1 = 5e_1 + 3e_2 - 3(2e_1 + e_2) = -e_1$
hence $e_1 = -c_2 + 3c_1$
and use that to solve the other equation
lmao ignore that
Namington:
well i'd probably take $c_2 = 5e_1 + 3e_2$ and subtract $3c_1$ from both sides
why do we subtract 3c1 from both sides
sorry just realized im an idiot
had to fix my work
uh i subtracted 3c_1 because it eliminates the 3e_2
do you know how to solve systems of linear equations?
this is just elimination
Is it not exist @restive shuttle
i think i have a solution now
ima write it up first, 1 sec
Since A and B are invertible, they have nullity 0. The product of two invertible matrices is also invertible. So AB and BA also have nullity 0. Therefore by rank-nullity theorem, the rank of both AB and BA is n.
@normal canyon
So it’s false?
yea
gg
I don't know how to go forward on this. I got that the rank(A) = rank(B) = 2 by rank nullity theorem
and rank(AB) = 0, since AB = 0
the nullspaces of A and B both have dimension 1 and their column spaces both have dimension 2 and for AB = 0 you need the col space of B to be contained in the nullspace of A
and that's impossible
why does the col space of B have to be contained in the nullspace of A for AB = 0
i've looked at a lot of linear algebra books like strang, lang and hoffman kunze
but i don't find them to be both comprehensive and also clear
do you guys have any recommendations?
im a first year uni student btw, i guess pure maths linear algebra is the flavour im learning
These are pretty much the standards, what exactly didn't you like about them?
i tried hoffman kunze but i didnt find it to be that clear
strang was great but it wasn't very proof based
Hm, from what I've read of it Hoffman Kunze is pretty clear
You just might not be super used to reading math textbooks?
They're pretty different from reading anything else and things are never really clear at first
You have to struggle with and think about things before they become clear
alright thank you
okay sorry this is a dumb question but its like 4am and ive been doing linear for so long
how do u get from
here to
here
is it a property?
ah so {v1, v2, v3} is an orthonormal basis
um.. sure
honestly dont rly understand this stuff conceptually which i know is bad but my schedule this quarter sucks and the teacher doesnt rly go deep in theory so i just memorize how to do stuff
okay wait it is . aproperty
the cross product takes two vectors and gives you a new vector perpendicular to both of those given by the right hand rule
the length of that new vector is the product of lengths of the input vectors, times the sine of the angle between them
if you know this, it's enough to get the direction and magnitude and answer your question, any of this new to you @bold blade ?
yea i learned that stuff in calc 3 but im taking it at the same time
i didnt end up actually needing it for this question tho..
i just took column vectors to find the basis
i was just confused bc there were no numbers but its the same process i guess
if you didn't "need it for this question" then I don't know how you could have answered it
this isn't a property on its own
it's something that comes from the cross product with angle of 90 degrees between the vectors and the vectors having length 1
Well I have a transformation of rotation followed by an enlargement
2sqrt3 -2
2 2sqrt3
and to find the SF, the mark scheme found the determinant, then said that SF is 4, and the determinant of that matrix is 16
and it didnt really explain the reasoning for the SF being 4
^Wondering if anyone can help clarify
What's "SF"?
What does R^4 mean? R is the real number symbol.
R^4 means the set of tuples (x, y, z, w), where x,y,z,w are in R
Often implied with it is a way to add the tuples or multiply the tuples by numbers, component-wise
@spiral sonnet
But not always
can some1 explain how they got from the first line to the second, like it makes sense when I look at it but thats only by intuition, is there a formalized way to make the transition of sums to vector/matrix representations
What's "SF"?
@vast torrent scale factor
the geometric interpretation of the determinant is: if you take the square made by the standard basis (or hypercube, in n dimensions) it gets distorted when you apply the matrix, and the area/volume changes by some factor. that factor is the determinant. so when you have a rotation and a scaling, the determinant is the scaling factor of the area, which is the square of the scaling factor of a basis vector
ok?
If I have a matrix and want to reverse 2 segments (parts) of that matrix . Is there a better approach to reverse only a smaller part if they intersect?
Both start and end are inclusive as shown in the example below.
Example:
We have the matrix [1, 2, 3, 4, 5] and want to reverse from position 1 > 4 ( becomes [4, 3, 2, 1, 5] ) and then 3 > 5 so it should become [4, 3, 5, 1, 2] as the final result.
@limber sierra i was trying to answer the question asked by @lone plover
ah, sure
@earnest juniper so you mean a permutation? not sure how matrices relate here
Ah ok
No idea, it's a list of numbers.
im not really sure what this means:
Is there a better approach to reverse only a smaller part if they intersect?
like, do you just want the programming method?
The problem is that I cannot use the normal reverse methods as I'm limited in the time.
limited in time? like computational time?
I'm learning competitive programming and I'm solving a couple of things now, so in competitive programming I have a time limit that I cannot exceed.
Yes, the computational time (time taken to execute operations).
ok, that clears up what youre asking
So I'm looking for a better approach to these flips/reverses.
i recall there being an O(n) algorithm for exactly this, but i cant recall it off hand
gimme a minute to think
Okie.
so for context i know python has a .reverse() list method, which is O(n) in the length of the sublist, but i'm unable to find good pseudocode for that
here's the source code:
static void
reverse_slice(PyObject **lo, PyObject **hi)
{
assert(lo && hi);
--hi;
while (lo < hi) {
PyObject *t = *lo;
*lo = *hi;
*hi = t;
++lo;
--hi;
}
}
static PyObject *
listreverse(PyListObject *self)
{
if (Py_SIZE(self) > 1)
reverse_slice(self->ob_item, self->ob_item + Py_SIZE(self));
Py_RETURN_NONE;
}```
as far as i can tell, here's the explanation:
1. Keep track of 2 indices, initially set to the start and end of the list.
2. Swap the elements at these indices.
3. increment the left index, decrement the right index.
4. Repeat from 2 while the right index > the left index.```
in this case, you'd start these indices at the start and end of the subarray
but same gist
I'll need to do 2 * 10^11 reverses, how much will that method take?
if i'm understanding it correctly, this algorithm takes n/2 iterations, so 10^11 iterations
i'm not aware of if there's a faster direct method
Is that for each reverse or for all of these reverses?
to do 2*10^11 reverses
er wait
sorry misunderstood what you meant
these are separate reverses? hmmm
well, it still takes n/2 time for each reverse, so k*10^11 where k is the average length of a reversed subarray
roughly
Array Size (1 ≤ N ≤ 100)
Reverses (1 ≤ K ≤ 2 * 10^9)
this doesnt seem particularly efficient, unfortunataly; there may be a better way
like i doubt theres a faster way than what python is implementing, since otherwise python would use it
oh wait hold on
do you know your arrays are always initialized in ascending order?
like do all your arrays start as 1 2 3 4 5 6 ...
Yes, that is guaranteed.
ah, that makes this easier
I think his question was more that, if we knew we had to do multiple reverses, is there some way we could save time rather than just doing each reverse after the other
zoph the answer to that question is "no if you don't know the original setup of the array at all"
but since the array is in natural ascending order like that, there's probably some tricks you can use
I couldn't find these "tricks", so I was wondering maybe I could use another brain to help me 😂
I'm not sure why the array being in ascending order matters here?
yeah, i'll think about it but it's been a while since i programmed anything tricky like this
okay, things are easier to compute
zoph it means we dont need to keep track of each element's value
i mean i want to look at this as a cycle composition now
lmao
thats probably not the best answer but
its what my mind jumps to
let me see if thats practical actually
using the cycle composition algorithm
hm, nah, the only way i can think of using the cycle composition algorithm here would probably be O(n^2) (or perhaps O(nlogn))
yeah, sorry, this is a bit above my programming paygrade
Thanks for trying, is there possibly someone else that's more familiar with these things? (time, tricks, etc.)
well, as zopherus said
@pastel harbor
if you wouldnt mind ❤️
if you're wondering what my cycle idea was, it exploited the property that a "reversing" permutation from a to b can be written as the cycle starting with (a b ...); sadly the only way i could think of to make use of this property required nested for loops, which wouldnt work so fast
there's probably a cleaner way in haskell, of all things
Alright, I'll provide as much details as possible that can help obtain the trick behind this question.
1: The starting array is sorted from 1 until 100
2: The reverse operation consists of 2 parts:
2.1: Reverse all elements in positions X1 .... X2
2.2: Then, reverse all elements in positions Y1 .... Y2
When repeating the reverse step you're repeating Step 2 in the same order with the same numbers every time.
Does that help? [@limber sierra]
The reverse operation is done on the same indices every single time.
oh interesting
Yeah, awesome timing :P
ok so the question you have
is to reverse twice in an array?
or are you trying to generalize
to k reverses
if the question is for k
I basically repeat Step 2 K times.
you can generalize with a fenwick/segment tree
yeah, then you can use a segment tree or fenwick tree
to keep track of the endpoints
and it reduces to a prefix sum problem
let me explain
notice that you only need to know the endpoints
You mean X2 and Y2?
I mean X1, X2, Y1, Y2
Alright.
so what you can do is
mark X1 with a +1
X2 with a -1
now the prefix sum indicates
whether an element is reversed or not
[0, 1, 0, 0, -1, 0]
prefix sum is [0, 1, 1, 1, 0, 0]
Ok.
so now you can extend this logic
you can apply all of your reverses in bulk
and then finally extract the resultant array
tbh
wait
But at each step, I need to do the X first then Y after.
yes
I think there might be a simpler way where you don't even need this, let me think if that is possible
Oki.
I mean the second reverse doesn't really matter
because the question is basically saying 2K reverses in total then
is that right?
But the second reverse is reversing a different segment with different endpoints, doesn't that make a difference?
Yes, that's correct.
oh
then this is much simpler

I was solving for different X1 X2 in each step
that is still solvable in n log n
When repeating the reverse step you're repeating Step 2 in the same order with the same numbers every time.
Alright.
I thought the first case can be if there's no intersection.
and if they intersect
if they intersect
take section from the front
of length equal to intersection
if this exceeds half intersection point
then you will need to recursively repeat
I could write some code tomorrow when I'm up 👀
what language do you find easy to read?
I need to hand over the thing now, can you just explain the last part one more time?
I'm working with C++.
Alright.
y1, y2 be 3, 7
3 to 5 is intersection
this means
after the first swap
you will have elements from
x1 to x1 + (intersection length)
inside that region
now, you will have x2 to y2 as the other points
note that in this case x2 to y2 is smaller
you will need to make different cases here as well
based on whether it is larger or smaller
this is what I meant where you do the x1 + intersection length as well
you will need to make two cases there
here the 3 will still come into the intersection
because intersection is larger
you must consider smaller intersection as separate case
anyway, if you handle all these cases
you can get a linear solution
but this is just pain tbh
for n = 100
no one cares,
you can just write the dumb n^2
and it will still run in under a second
But K can be up to 10^9, doesn't that make a difference?
oh
