#linear-algebra
2 messages · Page 281 of 1
Ax/|x| still lives in R^n tho 
so its in S^{n-1}
lmao im trying to figure that out
then it maps $\mbb{R}^3\setminus {0} \to S^2$
okay, so were just doing it in the case of a three by three matrix
and domain should be R^3 cut the kernel of A
I said for 3x3 matrices
...
didn't I?
?

eff
will extend to Rⁿ later if possible
alr
alr, so we got a map from some open subset of R^3 to S^2
Ax/|Ax|
to use browers, we need a function from B^3 to itself
yes
we won't use whole S2
take the intersection of S² with (x≥0, y≥0, z≥0)
positive entries guarantees that we have a map from that set to itself
different from Ax/|Ax|, right?
no
just resricting it to S^2 intersect the positive octant
okay, got it
now it's homeomorphic to B² to brouwer applies
yes
were restricting it to S^2 in the positive octant intersect R^3 cut the kernel of A
like... what if there is a hole, or a slice through the domain now?
im failing to see how anything is immediately homeomorphic to B^2 here
like what if u have something like this
hole?
kernel of A could pass through S^2 in the positive octant
lemme rephrase. what is homeomorphic to B^2?
S² ∩ (x≥0, y≥0, z≥0) =:D
okay, so my point is, that this map, Ax/|Ax|
could actually never have a point in this part of R^3 whose sum is zero, nvm continue
this situation cant happen because all the entries in A are positive. cool
yes
alr, so we essentially get a map from B^2 to itself
theres a fixed point
Ax = |Ax|x
oh wait lol
okay, nice
a lot more topological than LA
im looking at the proof on wikipedia for this

and it started off how i stated off here
cool
probably does something on B³ ∩ (+++)
yea. i wonder if ur result generalizes
probably does
it should
also not my result lol
lol
it's Frobenius result I think
sure
say $A$ is diagonalizable, find the necessary condition on $A$ such that $\m{A & A \ 0 & A}$ is also diagonalizable
a $C^2$ function $u:A\subseteq\mathbb{C}\to\mathbb{R}$ defined on an open subset $A$ is said to be harmonic if it saticies Laplace's partial differential equation: $$\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2u}{\partial y^2}=0$$
Given a harmonic function $u:A\subseteq\mathbb{C}\to\mathbb{R}$, show that there exists a harmonic function $v:A\to\mathbb{R}$ such that $f=u+iv$ is holomorphic on $A$
c squared
$\log(|z|)$ is holomorphic on $\mbb{C}^$ but it doesn't have a harmonic conjugate on $\mbb{C}^$
is it harmonic tho?
u get this function when you solve Laplace eq on R²
are you also sure it's v: A -> R?
also called the principal solution
yea, A to R or A to C, shouldnt matter i dont think
it'll also be false
dude nah thats cap
you get the HC as tan^-1(x/y)
if your domain contains y=0 points then it's not continuous
i'm under the impression functions C -> R are not holomorphic in general
i might be mistaken, it's 6 am and i literally just woke up
I'm talking about the set |x-2|≤1
read that wrong
whats ur ce if domain isnt simply connected and open
first find the hc of log(|z|)
probably atan(y/x) or atan(x/y)
either case you take a open ball on x axis or y axis
god damnit, i meant is simply connected and open
there's a thread on SoF discussing this
already saw ce for not simply connected and open
dude. if theres a c.e. for when its simply connected and open, im gonna flip
yea, and u just said, if im not mistaken, that log|z| has a harmonic conjugate on the ball centered at 2 of radius 1
no
i said if we choose the ball in such a way that the denominator y/x is invalid then it won't have a hc
oh
well, i have a proof that if the domain is simply connected and open (or as phrased in my class, diffeomorphic to a convex set), then any harmonic function has a harmonic conjugate on that set
"So any harmonic function always admits a conjugate function whenever its domain is simply connected, and in any case it admits a conjugate locally at any point of its domain."
thank you wikipedia for verifying
Show that the following function u=1/2 log (x^2+y^2) is harmonic and find its harmonic conjugate functions. - MATHEMATICS-2 question answer collection
not defined on y=0
"locally" 
wdym solve it on R^2?
when you dim = 2 you get the fundamental solution as $-\frac{1}{2\pi} \log{|x|}$
this the John Cina Laplacian transform?
alr, so ur saying if i solve it for n = 2, anything that satisfies LPE has to look like this?
no
it's a kernel

you get solutions by convoluting with it
kind of Green's function of Δ_2
these words are not registering in my brain. dont know much about diff eq
$\Delta \Phi(x) = \delta(x)$ is what I am saying
i feel like a baby who understands nothing. thank you for trying tho lmao
@teal grotto ask yr prof about log|z| because I also need an explanation
i will. what should i ask him specifically?
that in a ball centered at y=4 with radius 1, domain is simply connected and log|z| is harmonic, but harmonic conjugate is not defined on y=0
then how can it have a hc
something like this
idk

show that they have same dim?
ok then I'll let c² handle
:( dimention sounds easier
otherwise you can show that for $T\in \mathcal{L}(\mbb{R}^4, V)$, map $\phi : \mathcal{L}(\mbb{R}^4, V) \to V^4$ by $\phi(T) = (T(e_1), T(e_2), T(e_3), T(e_4))$
show it's an isomorphism
which is the direction c² was going right
I think so
dimension doesnt work*
wym doesn't work
*without assumption that V is finite dimensional
this is what they were trying but i dont think its right
cause i think c brought that up about not being FDVS a few hours ago
probably is FD
it can be shown in more generality is my point. question statement didnt have it and i was erring on the side of caution
true
I would recommend c^2's approach over dim argument
ok
one of the other probs mentions a FDVS so i dont think he would have just forgotten
as a sidenote even if V is infinite dim, the dim argument still works
see, thats the part i wasnt sure about
like, 4 times infinity is infinity
but like
that feels wrong
so dim or iso
this is indeed the question
isomorphic mapping 
rn I just have what u types to modify my errors 
showing its a bijection 
how tho
compose the and see if u get the identity
u want me to do this?
i dont think i've done a composition of homomorphisms before
right now u havent even shown they're homomorphisms. they're just functions at this stage
right cause i haven't show preservation under addition/scalar
do i need to show that before the composition
nope
order in which you show the properties doesnt matter
in general, sometimes showing that a function is a homomorphism might help you show that it is surjective or injective, or vice versa, but here it doesnt really matter
idk what im doing
need to write (Phi o phi)(T) = Phi(T(e1), T(e2), T(e3), T(e4))
should i rename these e's that ryu gave me
the e_i's are the standard basis elements in R^n. e_i has a 1 in the i-th component and zeros everywhere else
you dont have to rename them
just show that when Phi eats (T(e1), T(e2), T(e3), T(e4)), it spits back T
yea
yum
idk what im doing. do I need to simplify T(e_i) and if so how
so
ur gonna have to evaluate (\Phi o phi)(T)(x1,x2,x3,x4)
and show that that is equal to T(x1,x2,x3,x4)
for all (x1,x2,x3,x4) in R^4
for all 
and no, you dont need to simplify T(ei).
lol is okay. u have a formula for Phi(v1,v2,v3,v4)(x1,x2,x3,x4)
do i need to add some x1-4s to my inverse definition
muh x's are gone
put them at the right most side.
rn those things are not equal
u need the rhs to be Phi(T(e1), T(e2), T(e3), T(e4))(x1, x2, x3, x4)
anyway, Phi(T(e1), T(e2), T(e3), T(e4))(x1, x2, x3, x4) = x1 T(e1) + x2 T(e2) + x3 T(e3) + x4 T(e4)
now use linearity of T
Phi goes from V^4 to L(R^4, V). Phi(v) goes from R^4 to V
Can a flow equation result in variables being negative after solving using RREF?
is there anything wrong with the 2nd or 3rd line
no. after the last line, you can write = T(x1, x2, x3, x4)
'why the commas nowq
the commas are there
they are just hidden in the e_i's
e_1 = (1,0,0,0), e_2 = (0,1,0,0),...
oh right x1's a scalar
ye
so that shows that (Phi o phi)(T) = T
now you need (phi o Phi)(v1, v2, v3, v4) = (v1, v2, v3, v4) for all (v1, v2, v3, v4) in V^4
that was a vector in R^4
now these are vectors in V^4
like, if V = R^2, then an element of V^4 would look like ((a,b), (c,d), (e,f), (g,h))
think i broke somethign
there’s no T this time
had this prior
on the left hand side
oh
should be (phi o Phi)(v1, v2, v3,v4) and then just work through the definitions
notsure where my R4 is coming in/out
you dont need the xi's here
but muh definition
still on that problem?

current status
idk what u mean by that. how can I apply phi if i dont know Phi
phi(Phi(v)) = (Phi(v)(e1), Phi(v)(e2), Phi(v)(e3), Phi(v)(e4))
but you know what Phi(v)(ei) is.
should i make some step to show that v = v1...v4
am i missing a step?
cause its 1v1 + 0v2 + 0v3 + 0v4, 0v1 + 1v2 + 0v3 + 0v4, ...
now we gotta show that homomorphism
"we" 
I think i generally know how to do that but do I need to do it for both Phi and phi
isn't there a shortcut to show scalar and addition simultaneously
yes
rn:
show that Phi(av+w) = aPhi(v) + Phi(w). or for little phi. whichever one u think is easier
and if a function is linear and has an inverse, its inverse will also be linear
so u only gotta check if one of Phi or phi is linear
checking ax + ay doesnt get you the whole story they should be equivalent
checking av + w or av + bw gets u linearity in one check
ah i was thinking the av+bw
but yea, just check that av + bw works
for either phi or Phi
once you know linearity of one of the phi's, it will be automatic that the other phi will be linear
this is a good exercise, if a linear transformation is invertible, its inverse is linear
is this the correct step?
did i break math laws
no. but now you gotta stick (x1, x2, x3, x4) to the end of each term in the first two lines
here?
facts
now you can conclude that Phi(av+bw) = aPhi(v) + bPhi(w) as functions, so your map Phi is linear
nice
this is our total piece 💛
now im not gonna do this tonight; but this ones easier because the Fields/VectorSpaces are fixed, right?
same concept just 'hardcode' some iso
this time u can use dimension argument
ooooh
finding a basis for each space is easy
i prefer F^{m x n} or Mat_{m x n}(F)
MattDog_222
i hate words
Now rq can u use ur superpowerful brain to analyze if these "hints" are useful for...

im scared why did ryu 
eigenvalues :P
probably not
but maybe
I know i vaguely covered them at the end of the prereq
If the eigenvalues are non-degenerate is should follow that the eigenspace is one-dimensional and the algebraic multiplicity is equal to 1 right?
$\frac{\m{d & -b \ -c & a}{\det A } = A^{-1}$
no, not repeated eigenvalues
MattDog_222
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
why are u
ing me
@zinc timber if lambda is a root to the characteristic equation then there are no repeated roots
then yes
so is this useful
i was also confused. bad emote?
Dun scared me guys
non-linear map unique ?
no, just upper me for 2 consecutive messages

I want to prove the last statement, but how to prove it is injective ?
From the construction of M, it is guarantee to be surjective, but i dunno about injective
what is M?
( at the top )
yea. idk what that is
Hmmm, i dunno what it is called but that M thing change the bases
Btw is bases and basis the same ? 💀
M is the matrix representation
space of polynomials in A forms a vector space over the field
there is a particular bijective map on this space
this should give you $A^2 - (a+c) A + (ad-bc) = 0$
wait so why is A a matrix
er wait no its not
its the variable
$A^2 - (a+d) A + (ad-bc) = 0$
MattDog_222
since i had a typo
this A

ok so what do maps from 2D to 2D have to do with a 2x2 matrix
(everything ofc)
and i have 4 unknown variables
multiply both sides by A^-1 and rearrange
(A^-1 exists because it's assumed)
(what does it mean)

simplifying a littlemore i have $A^{-1}=\frac{A-a-d}{\det A}$
MattDog_222
3am math
Guys, in a vector space there can be more than 1 basis ?
yes
Hmmmm i thought it was unique
e.x. in R2, [1,0] and [0,1] are bases
elements are determined by a unique linear combination of the basis
then [2,0] and [0,1] are also bases
but to get the point <5,5> you need 2.5[2,0] + 5[0,1]
$A^{-1}=\frac{A-(a-d)I_2}{ad-bc}$
MattDog_222
I see, thank you !
Hi ! How can I find the distance between the elementary matrix E11 (one 1 on top left and then filled with n^2 - 1 zeros) to the vectorial subspace of matrix whose sum of diagonal terms is 0 ?
in what metric?
any ideas on how to show this for L > 1 given the steps of the Method of Conjugate Gradients?
B is symmetric positive definite
I suggest looking into Saad's book
I wish I could recall these
i was trying to find a formula, anyone could help me pls
@wintry steppe
the subtraction of which two numbers?
X,Y? P,Y?, X,P?
I am guessing X and Y
so (X+Y)Y = P and
(X-Y)X = Q
then solve the system, although those are not linear systems
I don't get what the purpose of the absolute value is there, X-Y is always non-negative since X>=Y
@peak goblet
if x and y postive or negative when we open the module the sinal changes all expression
X>=Y -> X-Y >=0
Either way, you get an polynomial equation of degree 4
This is still analytically solveable but it's painful
I would suggest a numeric root finder and then checking the ceil and floor integers of the found roots
wrong channel
it's not that simple, since X, Y are 16bit signed integers, their products are also to be taken as 16bit signed integers, so we'll get wrap around if they are large enough. better way would be to find an algorithm, which was the op's original question
Indeed the abs would make sense if the prescribed behaviour upon overflow is wraparound. I did the above assuming everything fits, as wraparound is not always the default: https://stackoverflow.com/questions/3679047/integer-overflow-in-c-standards-and-compilers
Anyways, this is off-topic as Ann noted.
So here's a linear algebra question
I have
$L = C - A(I-C)B, , C = diag(c) \implies \frac{dL}{dc} = I + AB^T$
criver
Is there an easy way to find $\frac{dL^{-1}}{dc}$
criver
If c was not a vector, but a scalar
Then I would have used:
$0 = \frac{d}{dc}(LL^{-1}) = \frac{dL}{dc}L^{-1} + L\frac{dL^{-1}}{dc}\implies \frac{dL^{-1}}{dc} = -L^{-1}\frac{dL}{dc}L^{-1}$
Ask your question btw, don't mind me
criver
OK thank you
In the characteristic equation of an eigenvalue problem, which can be written like this:
$\sum_{m=0}^{n} c_m \omega^m =0$ , the $c_m$ s can be complex numbers right (I mean not completely real in the general case)?
ElonMoist
Yes that's the equation we get it from
So if A is complex, the coefficients will also be
It would be all real if A has all real entries right?
Thanks for confirming
There are only multiplication, sign flips and additions involved
I was worried if I was missing something
And the reals are closed under those
If the determinant involved square roots you should be worried
The roots can be complex though
Even if the coefficients are real
A real symmetric matrix though will have only real eigenvalues
char poly is actually det(xI-A) not det(A-xI)
does the sign matter?
if you are talking about char eq then no, if you are talking about the char poly then yes
it's taken to be the monic polynomial, det(A-xI) is not necessarily monic,
If c is a scalar, all the diagonal entries of C world be c right?
I meant if c is scalar that is true for any L that is invertible
Where each element is a function of c
I've probably defined the problem poorly
It probably should read:
what do you mean by C=diag(c)? like cI?
$Lx = c \odot x + A((1-c) \odot B x)$
criver
c is a vector
nvm, I still have to work out the formulation
maybe edd can help
$N=[T]_{\mathcal{B}}^{\mathcal{B}}$
Mosh
would anyone know how to solve this. i cant find any notes about how to solve this
I have a quick question, suppose I have the following subspace of R^n : span(v1,...vk) of vectors in R^n and we want to find a base for them, does it make a difference if I put the vectors as rows in a matrix and find a base or if I put them as columns and find a base? are these two methods equivalent?
Gauss Jordan on the Augmented matrix [A|0]
aka RREF
Hey, I've got a quick question. If Q is a PSD matrix and $\lambda$ is its smallest eigenvalue then how does it hold that $v^TQv \geq \lambda | v|^2$ for all v?
ciri
are you sure you don't mean $v^TQv \geq \lambda \nrm{v}^2$
Ann
yeah that's what I have written.
can you show where you're getting the inequality without lambda
I see this is the case when Q = I?
this is the case when Q = I and in general when λ ≥ 1, but you're not answering my question
I can't see any explanation for this
...let me ask you again
where are you getting it from that $v^TQv \geq \nrm{v}^2$ for any pos-semidef matrix $Q$?
Ann
i can name you a matrix Q for which this most definitely doesnt hold.
bruh
okay, so what you REALLY meant to ask is why the inequality $v^T Q v \geq \lambda \nrm{v}^2$ was true
Ann
in which case, the answer is fairly simple: $v^TQv - \lambda \nrm{v}^2 = v^TQv - v^T (\lambda I)v = v^T(Q-\lambda I)v$, and $Q - \lambda I$ is pos-semidef by construction.
Ann
All clear. Thanks !
I have the following linear operator that depends on a vector c
$Lx = \sum_i A_icB_ix$
criver
Taking the vector derivative of the inner product below results in:
$\frac{d}{dc}\langle Lx, y\rangle = \sum_{i}A_i^*yB_ix$
criver
Is there anything that I can show for the the derivative of the inverse operator
$\frac{d}{dc}\langle L^{-1}x, y \rangle = ?$
criver
For instance I know that if L were to be a matrix that depends on a constant c, then
$0 = \frac{d}{dc}(LL^{-1}) = \frac{dL}{dc}L^{-1} + L\frac{dL^{-1}}{dc} \implies \frac{dL^{-1}}{dc} = -L^{-1}\frac{dL}{dc}L^{-1}$
criver
Can something similar be done for the above inner products involving a vectorial c?
I can do the following:
$0 = \frac{d}{dc}\langle L^{-1}Lx,y\rangle$
criver
But I am not sure how to translate the product rule, or whether it can be translated at all
not sure whats really going on; but yesterday there was something about using a characteristic polynomial to find A^-1. so I solved for A²-(a+d)A + (ad-bc) = 0
Yeah since $A^2-\operatorname{Tr}(A)A+\operatorname{det}(A)I=0$
Mosh
yeah thats where i got the abcd from a $\begin{bmatrix} a & b \ c & d \end{bmatrix}$
MattDog_222
but idk what information that lends itself to
like we need $p(A) = \frac{A-(a-d)I_2}{ad-bc}$
MattDog_222
but thats not a polynomial
Why not?
It's a polynomial in A
You have
$p(A)=\frac{1}{ad-bc}A^1 - \frac{a-d}{ad-bc}A^0$
Where by convention A^0=I
RYC for mod
so now wait how did we know A is a 2x2?
cause V is 2 dimentional?
where does this take me
is that just the answer?
Well, that's one option, but you don't have to treat A as a matrix here
ad-bc isn't well defined for a linear transformation
Since you need to choose a basis
But det and trace are invariant of choice of basis
You can also do this by considering powers of A in L(V)
this basis?
Again
That doesn't mean anything
You need to. Choose a basis to talk about matrices of transformations in an abstract vector space
I just mean consider the set id, A, A^2, A^3, A^4 in the space L(V)
Think of what the dimension of L(V) is
If you have an arbitrary polynomial which A satisfies, then you can get a polynomial for the inverse. This is nice since you don't need to assume Cayley-Hamilton
This was our 'hint'. U mean something like this?
should i change approach to avoid the characteristic poly?
and?
i think thats it actually
ok, how does that show it's a subspace?
because its closed under addition and scalar multiplication
i think you need to do some type checking
E is a subset of L(V, W)
take two elements, say T_1 and T_2
what type do they have? why is their sum in E?
T_1(v) + T_2(v) = 0 + 0 = 0
its not really :/
well ok, this is correct anyway
scalar multiplication follows the same way
i think you also need identity in E (or E nonempty) and then that should be it
T is a transformation from V to W
then what do i need to make to show its closed
what was wrong with this?
v is the same right
yes
doesnt it need to be difference
i mean technically you have to show (T_1 + T_2)(v) = 0
ohhh
E is the subspace of all linear maps that are 0 on v
so you have to show that the sum of two of those is 0 on v as well
i think im missing up the order. I have
$(T_1 + T_2)v = T_1v + T_2v = 0 + 0 = 0$
MattDog_222
notation-wise it is now correct
but wasn't I supposed to show that $(T_1 + T_2)v = T_1v + T_2v$ not assume it
MattDog_222
this is how the sum of two linear maps should be defined
i am sure you defined L(V, W) somewhere
i suggest to look at that
this will also answer your other question of what the identity should be
since this question asks you to show E is a subspace of L(V, W) you must have covered that
so i need the identity for the subspace to hold?
subspaces need to have an identity
what is 0 here?
a scalar on the left and an element of W on the right
how is a scalar an element of L(V, W)
if your vectors are transformations, what is the 0 vector going to be?
the zero transformation
E is the zero mapping
the set of zero mappings
Yes, it ends up being that E={0}, so what?
you still need to show 0 in E
you've shown a linear combination of transformations in E is in E, however you still need to show E contains the 0 vector
0 = T : Tv = 0
0_E = 0Tv = 0_W?
$0v=0$
Mosh
so $0\in E$
Mosh
why do you have T here?
0 is the transformation you're considering
cause vectors in E are transformations
Why do you have T
when you're doing a concrete example of the 0 mapping
This is like saying x=3 for 2x+1 means 2(3x)+1
yea
yeah T = 0, not 0T 
E is generally not 0
Yeah but you don't need to explicitly write T=0
"Since 0v=0 for any v in V, 0 in E"
Yeah realized after
Anyways it might be and that shouldn't matter, you're right
The point is to prove that E is nonempty, this is usually easiest to do by proving the 0 map is in it as mosh said
Cause stuff with 0 vectors work very simply
so for 5B if v != 0, dimE should be the number of vectors in a basis for E. but wtf would a basis of E even look like. just the zero transformation?
Well consider a concrete example
for example v=[1,2] and V= R^2
then $E={T\in\mathcal{L}(V,W)|T[[1,2]^T]=0_W}$
Mosh
E is simply the set of all transformations b/w V and W st [1,2] maps to 0
Do you know how a basis for L(V,W) looks?
Try and draw inspiration from that
It's a similar construction
i dont think I know what it looks like
i feel like dimE = dimV + dimW or dimV * dimW
a hint to find a basis of L(V,W) is to recall that a linear map is uniquely determined on a basis of V
is a basis the columns in the matrix representation?
For T in L(V,W), we have the matrix representation of T is [T(v_1), …, T(v_n)] where v_1,…,v_n would be a basis in V.
Yeah sorry I went ahead and turned in what I had. He said something like dimV-1 * dimW i think
to get the least squares beta, its just (XTX)-1 XTY right?
im trying to solve this
so im assuming x would just be a row vector of [-2 -1 1 2 4]
but when i do the XTX -1
i get a determinant of zero?
Is it true that matrix representation of L T changes with change in bases ?
<@&286206848099549185>
yes
Okay ty
Hello
hi, I would like to find the roots and multiplicities of a polynomial which is R[x] (R real-ring, ring of polynomials). However, when I factor the polynomial I get one factor as (x^2+1). My question is do I take x=+-i as a root or no?
R as in $\bR$?
Ann
if so then no
if you were factoring it in $\bC[x]$ then you would split $(x^2+1)$ into $(x+i)(x-i)$
Ann
R as in $\bR$[x] (polynomial ring)
dim99
okay so that's a yes
so I will not use the x=+-i as a root
yes, x^2 + 1 is irreducible in R[x]
oke thanks @dusky epoch I think i got now why +-i is not a root
when we take a derivative of an inner product wrt a single variable, in the finite dimensional-case we get a Kronecker delta:
$\frac{d}{dx_i}\langle x, y\rangle = \langle \frac{dx}{dx_i}, y\rangle + \langle x, \frac{dy}{dx_i}\rangle = \langle \delta_i, y \rangle$
criver
How does this generalize to infinite-dimensional spaces? That is, the Kronecker delta will become a Dirac delta, but how is the derivative formulated? Is it:
$\frac{d}{d x_a}\langle x, y\rangle = \langle \delta_a, y \rangle = y(a)$
criver
criver
Is this formalized anywhere?
It's some kind of derivative with respect to a lower-dimensional object
Also when would this be equivalent:
$\left(\frac{d}{dx}\langle f(x), y\rangle\right)(a) = \langle \frac{df}{dx}\frac{dx}{dx_a}, y\rangle = \langle \frac{df}{dx}\delta_a, y\rangle$
criver
where the left-hand side is to be understood as a Gateaux of Frechet derivative, and the right-hand side is what I have above
clearly in the finite dimensional case the above is equivalent (y is not a function of x)
pinging this again if anyone can help
https://cdn.discordapp.com/attachments/540211747613704221/944423692711108650/Screen_Shot_2022-02-18_at_8.42.26_PM.png
im trying to solve this
so im assuming x would just be a row vector of [-2 -1 1 2 4]
but when i do the XTX -1
i get a determinant of zero?
$\beta_0 + x_i\beta_1 + r_i = y_i, \quad \beta^* \in\arg\min |r|^2$
criver
im not quite sure what that means :/
yea exactly
that has the lowest distance to all points
the above is the equations that you have
beta0, beta1 are unknown
you have the points (x_i, y_i) from your problem
r_i is the residual
$r_i = y_i - (\beta_0 + x_i\beta_1)$
criver
yes agreed
now if you were to write this in matrix form:
$r = y - \begin{bmatrix} 1 & x_1 \ 1 & x_2 \ 1 & \ldots \ 1 & x_n \end{bmatrix} \begin{bmatrix}\beta_0 \ \beta_1 \end{bmatrix}$
why do you include a column of 1s?
for beta0
i guess like how did u get that from the problem?
from here
criver
note that this is just the equations in matrix form
hmm ok ok so since its the minimal distance. 1 is the lowest
since 0 means no distance
Let's call this matrix X, and the column vector with the betas beta
then
$\beta^\in\arg\min|X\beta-y|^2 \implies \
X^TX\beta^ = X^Ty \implies \beta^* = (X^TX)^{-1}X^Ty$
you get the equation by taking the derivative wrt beta and setting to zero
to be sure the derivative is:
criver
$\frac{d}{d\beta}|X\beta-y|^2 = 2X^T(X\beta-y)$
criver
criver
ah ok yea so i understand that Beta = (XTX)-1(XTy)
but even then to get XTX -1
i did what you said where i set a column of 1s and then the x's
and the determinant is zero?
typically you do not invert the matrix explicitly
typically you solve it with an iterative solver, especially for large systems
X^TX's determinant is zero? I doubt it
maybe if you have linearly dependent stuff
but then that means that you have multiple solutions that would fit
an iterative solver like CG would find one of those based on the initial guess
OH i think i was making the mistake of saying
X = row vectors instead of columns
thus xtx -1 = singular
you need X like this
it's a n x 2 matrix
so X^TX is a 2x2 matrix
if you compute X^TX it's explicit to invert
yea i got a 2 x 2 matrix for xtx
if you don't compute X^TX then you use an iterative solver applying each to a vector separately
\begin{pmatrix}\frac{55}{19}\ \frac{12}{19}\end{pmatrix}
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
so here to get the residual its y - that?
where y is a column vector of the y values?
yes
that's the residual
but you want to minimize
$\min_{\beta}|r|^2 = \min_{\beta}|X\beta-y|^2$
criver
which yields you the normal equations
ok idk why but im not getting the right answer
hmm
bc i did this in R already and i got the right answer
but on hand its not right
i have to for exams tho ;/
im studying for an exam
on the actual submission i did it in R and i got feedback on it
which is why ik the answer is right
but im trying to learn how to do it on paper
well you have to compute 3 dot products
dot(x,x), dot(x,1)=dot(1,x), dot(1,1)
your X^TX looks like this
$X^TX = \begin{bmatrix} x^T1 & x^T x \ 1^Tx & 1^T1 \end{bmatrix}$
criver
wait I flipped them
you're right
it's
$X^TX = \begin{bmatrix} 1^T1 & 1^Tx \ x^T1 & x^Tx \end{bmatrix}$
1, 4 4 26
criver
now you need X^Ty
you know the inverse of a 2x2 matrix I assume
yes
2.6 -.5 -.5 .1
so ill dot them
31.4 -5.9
in a column
hmm
oh wait
nvm
\begin{pmatrix}314\ -59\end{pmatrix}
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
that still doesnt seem right?
well this doesn't look right:
2.6 -.5 -.5 .1
yea
that was supposed to be
:\begin{pmatrix}26&-5\ ::::-5&1\end{pmatrix}
instead
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
:\begin{pmatrix}26&-5\ ::::-5&1\end{pmatrix}\begin{pmatrix}17\ ::28\end{pmatrix}
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
where's the det
is (xtx)-1(xty)
1/det
here?
oh ur right
\begin{pmatrix}\frac{13}{57}&-\frac{2}{57}\ -\frac{2}{57}&\frac{5}{114}\end{pmatrix}
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
this is xtx -1 then
take out the 1/114 outside instead
then perform the multiplication, then get it back inside
check your X^T y too
my xty is \begin{pmatrix}17\ :::28\end{pmatrix}
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
either way these are algebra calculation issues at this point
yes
\begin{pmatrix}\frac{13}{57}&-\frac{2}{57}\ -\frac{2}{57}&\frac{5}{114}\end{pmatrix}\begin{pmatrix}17\ 28\end{pmatrix}=\begin{pmatrix}\frac{55}{19}\ \frac{12}{19}\end{pmatrix}
xoxo
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
i still dont think thats right tho :/
i just did it in R again
so confusing
X = cbind(1, x)
y = c(1, 3, 3, 5, 7)
beta_hat = solve(t(X) %*% X) %*% t(X) %*% y
beta_hat
y_hat = X %*% beta_hat
RSS = sum((y - y_hat)^2)
RSS```
HI why log10(100) = 2 <=> so log2
(100) = 2 times 3.322, or 6.644
wrong channel, but 10^2 = 100, so log10(100) = 2. log2(100) = x : 2^x = 100
6<x<7
any idea regarding this @zinc timber ?
what are you trying to do?
$\alpha = u^TAv = v^TA^Tu = (Av)^Tu = (u^TAv)^T = \alpha^T$
show that u^TAv = v^TA^Tu
criver
so this isnt valid/
I don't get what's happening there
ngl having hard time understanding d/dx_a on infinite dim vs
same thing, that's why I am asking, but at least there's the intuition from the finite-dimensional case
A^Tv^Tu^T
and I tested some examples where the Frechet/Gateaux derivative match with this derivative that pops out a Dirac delta
that is, there must be some sufficient conditions for which this holds
don't take the transpose of this
if you start with alpha = u^TAv
then take the transpose of alpha: alpha^T = (u^TAv)^T = v^TA^Tu = (Av)^T u
and since alpha = alpha^T the two agree
how r u able to switch the u and v tho?
(AB)^T = B^TA^T
but theres a matrix in the middle right
ok
(ABCDEFGH)^T = H^TG^TF^TE^TD^TC^TB^TA^T
it flips the order
same with inverse
ah ok so even if u have something in the middle
it still flips
OH
nvm
im so dense
(ABC)^T = C^T B^T A^T = (BC)^T A^T = C^T (AB)^T
yea im so sorry
my mind is fried haha
couldnt you literally then just say
u^TAv = v^TA^Tu because
if you took the transpose of u^TAv
it would just flip and be
v^TA^T u
(u^TAv)^T = v^TA^Tu yes
but you have to show that u^TAv = (u^TAv)^T before that
which holds because both are scalars, transposing a scalar does nothing
ah ok
if those were not scalars
e.g. if it was
Av != (Av)^T
simply because one is a column vector, and the other is a row vector
the only way those can agree is if Av is a scalar
i.e. A is a 1xn matrix and v is nx1
ah ok ok that makes sense tysm
I figured at least what it should intuitively mean
in the finite dimensional case the derivative wrt some coordinate is the directional derivative wrt e_i, equivalently wrt the Kronecker delta_i
Then in the infinite-dimensional setting this generalizes in the sense that we pick the direction to be the Dirac delta
i.e.
$(Df)(\delta_a)(x) = \lim_{\lambda\rightarrow 0}\frac{f(x+\lambda\delta_a)-f(x)}{\lambda}$
criver
Hi is this explanation over?
I dont want to budge in if a question is still being answered
just ask your question
Hi Im having difficulty with matrix transformations with the polynomial space
I am in struggling specifically with the Differentiation and then Integration of Matrix
In my book its state if you use 2 functions which are linear
If one provides integration and then the second one differentiation
If we choose v = 1 both transformations will have a result of 0 when combined
thing is in infinite dim, delta functions are not a basis (because there are unc many of them)
it's a generating set
SO T^-1T(1)=0
so do I need a reproducing kernel hilbert space then?
whilst T is differentiation and T^-1 Integration
what is this v = 1
its the the vector in the linear transformation for differentiation
Its how its written
so I would assume its a number without x
so differentiation would be 0
Im give an example
found something relevant: https://mathoverflow.net/questions/138392/validity-of-functional-derivative-using-the-dirac-delta-function?rq=1
If you have V=1,x,x^2,x^3 and W=1,x,x^2
So this is for the Differentiation
you have then Av=w
if you solve for the core of (Av)
then you would do coreW=0
there you find out that the core is onedimensional
cuz 1 stays in W if you change all x= 0
Now you know the rule that dim W+ coreW = DIM V
so then you know dimV is 4
Now thats for differentiation
for integration you do the other way round
but for W --->V
So T(v) would differantiate the vectors and T^-1 would integrate them
Now if you do the Integral of the differentiation of 1 = 0
Thats where i get lost
i get that the matrices with another so
A*A^-1=(3x3) and A^-1A = (4X4) so the top row is 0
but i cant make the connection with
is the point to show that differentiation doesn't have a trivial kernel?
T^-1T(1)=0
because sure, dc/dt = 0, regardless of the constant C
to recover this with integration you'd need to set appropriate boundary conditions
i meant kernel when wrote core btw mb
all constant functions get mapped to 0
mmmm
vice versa, an integral is determined up to a constant
i get that
I don't get what the question is


