#linear-algebra

2 messages Ā· Page 221 of 1

lavish jewel
#

<@&268886789983436800>

#

thanks

north anvil
#

Assuming this channel is not in use

Is this the simplest way to calculate the cross product of 2 or 3d vectors?

nocturne jewel
north anvil
#

you can't cross a 2d vector with another 2d vector?

nocturne jewel
#

and I mean those are just the components of the cross vector

#

no

#

where's the 3rd dimension in R^2?

north anvil
#

good point

#

so if a cross product is defined between two vectors P and Q, then both P and Q are 3-dimensional

nocturne jewel
#

Yes

north anvil
#

why can't this apply for higher dimensions (i can't visualize it, anyway)?

nocturne jewel
#

Outer products exist for higher dimensional co-ordinate spaces

north anvil
#

oh okay - i guess different types of products apply for higher dimensions

nocturne jewel
#

Yeah, you create inner product spaces by introducing an inner product like the canonical dot product

#

outer products just aren't covered in say first year linal

north anvil
#

Does the screenshot I sent above essentially use the formulas for the determinants of matrices that are inside or part of a 3x3 matrix with the components of A, the components of B, and the components of the cross product of A x B

nocturne jewel
#

yes, the 1st row of the matrix is the unit vectors, then components of a and components of b

#

$a\cross b =det\left(\begin{bmatrix}i&j&k \ a_x&a_y&a_z \ b_x&b_y&b_z\end{bmatrix}\right)$

stoic pythonBOT
north anvil
#

right

#

to get the component of i, find the determinant made by the matrix that has 0 entries that share a row or column with i

nocturne jewel
#

You just compute that det

#

laplace along the 1st row like normal

north anvil
#

cross out the row + column where i is in, and the matrix formed by the remaining entries is the determinant that becomes the component for i

nocturne jewel
#

yes, the cofactor

north anvil
#

isn't laplace multivar?

#

idk that ;-;

nocturne jewel
#

laplace / cofactor expansion is how you evaluate determinants

wintry steppe
#

quick question: i've posted a linear algebra problem inside math help question, should I delete from there and eventually post it here so It is more "on topic" or those channels are for every math discipline?

#

sorry for disturbing though

north anvil
#

ty mosh šŸ‘

nocturne jewel
#

the help channels are for any question, higher level math tends to be put in the corresponding channel though

wintry steppe
#

uh okay, so I'll leave it there. It's in #help-3 in case someone wants to solve a stupid problem I can't understand ahah

turbid trellis
#

Hey how to calculate this, I assume it's with matrices ?

#

However h and k are not defined, so I'm not sure how to solve

teal grotto
#

multiply the top equation by -3

turbid trellis
#

Yes I figured that out

#

But I need to find h and k

teal grotto
#

the values of h and k that work are the values h and k such that k = 3h

turbid trellis
#

Ah okay I understand

#

Since the equations are equal after all

#

Only we need to divide the final k back to h based upon the left side of the equation and how they're related

teal grotto
turbid trellis
#

I understand thanks

#

I just started reading an book on linear algebra

teal grotto
#

cool! not sure what ur second question is asking

turbid trellis
#

I have no second question

#

I just had to find h and k which make the system consisten

teal grotto
dusky blaze
#

What do you call one "thing" in a matrix?
Like if you have the Matrix

[a b]
[c d]

a is a what of the matrix? Element?

tidal wharf
#

entry

#

yeah or matrix elements

#

both are used

tidal wharf
dusky blaze
#

@edgy grail My function that I wrote to determine if lines intersect using linear algebra fails on partially overlapping parallel lines. The lines I tested were [(1, 1), (1, 3)] and [(1, 2), (1, 4)].
The reason it determined that the line segments did not intersect is because the matrix A was determined to be not invertible.
The matrix A being

[x1 - x0  x2 - x3]
[y1 - y0  y2 - y3]

Filling in the values, we get the matrix

[1 - 1  1 - 1]
[3 - 1  2 - 4]

Simplifying, we get the matrix

[0  0]
[2 -2]

Is it true that this matrix is not invertible?

teal grotto
#

yes, it’s determinant is zero.

dusky blaze
#

Interesting. The determinant is zero but the line segments still intersect.

teal grotto
#

well, that’s expected. they’re the same line (the ā€˜that’ being zero determinant)

dusky blaze
#

hmm

#

I either forgot that or I didn't understand the significance.

#

Alright, thanks for the insight.

hollow finch
# dusky blaze But they aren't the same line (segment).

The line segment is on the line that that matrix describes, however.
Zero determinant means that the system might not have a solution, but it still could. A nonzero determinant means there will always be one unique solution.

#

You said your function is used to

determine if lines intersect
right? is that in 2 dimensions or 3

#

Because in two dimensions, unless they are parallel they will always intersect.

#

Do you maybe mean that the function finds where they intersect? Then the answer is not longer trivial

dusky blaze
# hollow finch The line segment is on the line that that matrix describes, however. Zero deter...

Zero determinant means that the system might not have a solution, but it still could. A nonzero determinant means there will always be one unique solution.
This is great information. I thought that zero determinant meant that the system will not have a solution. And that a nonzero determinant meant that there will be a solution.
right?
No. It determines if two line segments intersect.
is that in 2 dimensions or 3
That's in two dimensions.
Because in two dimensions, unless they are parallel they will always intersect.
I'm talking about line segments not lines. Non-parallel line segments may not intersect in two dimensions.
Do you maybe mean that the function finds where they intersect?
Currently, the function just finds the values of t and s, the variables for the interpolation/extrapolation functions for the two line segments a(t) and b(s). I use these values to determine if the point of intersection lies on the line segments or on the infinite extension lines (extrapolated). The commented part of the following code sample explains how I use t and s. (The comments start with a hash character)

       # 0 <= t <= 1 describes all points on the first line segment
       # 0 <= s <= 1 describes all points on the second line segment
       # Therefore, if the point of intersection is on both line segments, then the line segments intersect
       return 0 <= t <= 1 and 0 <= s <= 1   # True if intersect, False otherwise

Here is a sample of the code. It's pretty Englishy so if you don't know programming, you might still understand it.

dusky blaze
# hollow finch The line segment is on the line that that matrix describes, however. Zero deter...

Here's the part that is logically messed up.

        # Matrix A must be invertible
        A = Matrix([[x1 - x0, x2 - x3], [y1 - y0, y2 - y3]])
        if not A.invertible:
            print("A is not invertible so lines do not intersect")
            return False   # Lines do not intersect

The reason why I check if matrix A is invertible is because if it isn't invertible, then the determinant will be zero. Zero determinant is a problem because I need to divide by the determinant later on.

        # The inverse of a matrix, A.  is defined as follows
        # [a b]^(-1) = 1 / (determinant(A)) * [d -b]
        # [c d]                               [-c a]

        # Therefore, the inverse of A for our system can be written as
        # 1 / (det(A)) * [y2 - y3    -(x2 - x3)]
        #                [-(y1 - y0)    x1 - x0]

If the determinant is zero and I divide by it, then that's undefined.

teal grotto
#

got a dumb question. the vector space C over R. how do you represent matrix multiplication?
like a matrix A would have real entries, but what dimensions would it have, if i want to do Av for some complex vector v?

nocturne jewel
#

I might be missing something.. but complex numbers arent matrices...?

thorn robin
#

Not with that attitude

#

@teal grotto If you're just considering C as a 2-dimensional vector space over R and identifying x + iy with (x, y) then I don't think you have a natural way to represent complex multiplication

#

But if you identify x + iy with a 2x2 matrix (x, -y; y, x) then you can check that complex multiplication corresponds to matrix multiplication

#

Additionally with this identification you get that |z|^2 corresponds to the determinant

nocturne jewel
#

I mean my prof had mentioned stuff like polar decomposition was like exp form of a complex number, but never understood what he meant lol

teal grotto
#

like if i want A to represent some linear transformation from C to C

nocturne jewel
#

Oh matrix vector multiplication?

teal grotto
#

i just want to do Av

nocturne jewel
#

ok yeah makes sense now lol

teal grotto
#

but like

#

v isn’t a two by one matrix like in say, R^2

#

so…i’m confused

hollow finch
#

@teal grotto not sure what you mean. like A is real and v is complex and you want to represent Av with all real matrices?

teal grotto
#

um. so R^2 as a vector space over R. it’s two dimensional and linear transformations from R^2 to R^2 can be represented by 2 x 2 matrices with real entries.

asking for the analogue in the vector space C over R

hollow finch
#

Well you can have v'=(Re(v),Im(v))

#

C is isomorphic to R2

#

If that doesn't answer it then I think i still don't understand your question

teal grotto
#

oh wait. did i just not realize

#

C is a two dimensional R vector space. isomorphic to R^2

#

bruh

#

see. dumb question

teal grotto
#

lol thanks

hollow finch
#

Np

wintry steppe
dire thunder
#

@wintry steppe this is not linear algebra

wintry steppe
dire thunder
wintry steppe
#

Alright thanks

drowsy flower
#

I know one common rotational matrix is $\begin{bmatrix} -1&0\0&-1 \end{bmatrix}$

stoic pythonBOT
#

meguuuuu

drowsy flower
#

and its det is 1 as well, would this work?

dusky epoch
#

presenting this as an example of "det(A) = 1 implies A is a rotation matrix" does not constitute proof

#

just because this particular matrix of det 1 is a rotation doesnt mean they all are

#

and in fact,

#

$\bmqty{5 & 7 \ 7 & 10}$

stoic pythonBOT
drowsy flower
#

hm okay so how do I approach this question then.....

nocturne jewel
#

well is the statement true or not?

drowsy flower
#

My guess is that it might be true ... but not sure

#

I think such alpha might exist

nocturne jewel
#

well what about the matrix Ann wrote out?

drowsy flower
#

um isee it has determinant as 1

#

and that its transpose is itself?

#

im confused what I am supposed to look for there...'

weak needle
#

See what the matrix does to the basis vectors (0,1) and (1,0). Can the matrix possibly be a rotation?

drowsy flower
#

ah no thats not rotational matrix because that matrix * its transpose is not identity matrix

weak needle
#

Correct

drowsy flower
weak needle
#

What I was trying to get at was unit vectors are not mapped to unit vectors

chilly osprey
#

all i need to do is find the derivative of the equation

#

and then plug in 3 with all the values of x

lavish jewel
chilly osprey
#

right?

#

oh sry

#

didnt notice

dapper scarab
#

quick question

#

if im correct this is independent right for the last row its 000 and there are two pivots remaining

#

nvm its dependent free variable

#

oops

turbid trellis
#

Hey how to find this ? Manually I can only figure out one value for h

#

Nevermind

#

h != 2

#

Because they will be parallel at h=2

wintry steppe
#

So, Riesz's representation theorem works for just inner product spaces, right?

#

Or is it solely for Hilbert spaces?

glacial mango
turbid trellis
#

Okay I have no clue how to do this

#

Or what they're actually asking

leaden tide
#

"consistent system" just means there's one and only one solution

turbid trellis
#

Oh the book says one or more solutions

#

However what are they asking ?

#

The question confuses me

leaden tide
#

Most notably, if you have a row that's like 0 0 0 a with a ≠ 0 it's not gonna be consistent

turbid trellis
#

Okay I understand that part

#

g and h and k != 0

leaden tide
tidal wharf
leaden tide
#

Do you really think a+b+c=0 has no solutions because the RHS is 0

turbid trellis
#

No I think g,h and k may not be zero ?

leaden tide
#

why couldn't they?

turbid trellis
#

Nevermind I misread your message

#

I'm new to all of this

wintry steppe
leaden tide
#

it's aight

turbid trellis
#

But what do they want from me?

#

I have the answer on my right but I don't know what it means

wintry steppe
leaden tide
#

And it is possible, by doing row operations

#

If it wasn't, there would be no question, any values of g,h,k would do

turbid trellis
#

Why do they want 0 0 0 if there are only 3 rows of the left size ?

leaden tide
#

what?

turbid trellis
#

I learned that in trinomial like that in the question

#

And have three of them

#

They need to end up like

#
1 0 0
0 1 0
0 0 1
tidal wharf
turbid trellis
#

So why would we want 000 ?

leaden tide
#

You're mixing up some things

#

If you're able to get to the identity (the matrix you posted), then great

#

That means that your system is invertible i.e for any g,h,k, there's one and only one solution to the system

#

But that's not always the case

turbid trellis
#

I don't know how to get to the identity in this one, because it contains variables

leaden tide
#

variables can be added and multiplied like anything else

#

but the thing is

#

you're not going to get the identity

#

you can try, but at some point you're gonna end up with a row of 0s whether you like it or not

turbid trellis
#

In this scenario ?\

leaden tide
#

yup

#

Let's go over this again

#

if you could get to the identity, that would mean the system is invertible

#

any g,h,k gives you one and only one solution

#

in particular, you always have at least one solution

turbid trellis
#

I didn't read about invertible systems yet

#

I am at chapter 1.1 haha

leaden tide
#

Who cares about the jargon, call it "always one solution", call it "invertible", call it "i can get to the identity", it's all the same

#

Do you really think that they would ask you this question (when does the system have solutions) if you could prove that the system always has solutions?

turbid trellis
#

No

#

It only has one solution right ?

leaden tide
#

Actually, either it has none, either it has infinitely many

turbid trellis
#

Okay that I understand

leaden tide
#

Usually, you'd expect three equations of three variables to completely determine a point

#

I mean, you should have enough info, right?

turbid trellis
#

I guess, but it asks me to find an equation or something

leaden tide
#

we'll get there

#

If you can derive one equations from the other using linear combinations, well then that just means one of your three equations doesn't add any new information

turbid trellis
#

Okay shall I do that now ?

leaden tide
#

Yeah, find which row can be expressed in terms of the others

turbid trellis
#

I'm stuck haha

#

I can't find anything in here to merge

#

Is this some other starters have trouble with too ?

leaden tide
#

For example, if you're trying to see if the 2nd row can be expressed in front of the others, you first gotta at least make sure that it works for the first coefficient

#

The question would be then to find a and b such that a(-1)+b(2)=0

#

give me some

turbid trellis
#

What do you mean with expressed in front of the others ?

#

I wish the book actually explained what they're doing instead of just showing the answers

leaden tide
#

Yeah...

#

If we call your rows R1, R2 and R3

#

Then we're trying to find, say, a and b such that R3=aR1+bR2

turbid trellis
#

Ah okay like that

#

Let me try that

leaden tide
#

If this works for the entire row, it has to work for the first coefficient

#

Then you see if the numbers you found work for the rest

turbid trellis
#

Okay and a and b will be used for the rest too ?

forest quiver
#

Which book are you using sentineL?

leaden tide
turbid trellis
forest quiver
#

Oh I was using that one for a while

#

But I switched to another

turbid trellis
#

I just want to learn linear algebra, if it's this book or another, I don't care

forest quiver
#

This one is pretty good for computations I feel like

#

I came a bit late

#

So what was ur concern exactly?

#

Is there somethign specific you don't understand?

leaden tide
forest quiver
#

So just get it into reduced echelon form (remember that g,h,k are numbers just like the other ones)

#

Syst3ms do you mind if I ask a question really quick?

leaden tide
#

go ahead

forest quiver
#

So

#

it took me about a day of reflecting

#

But I finally understand where dot product comes from

#

this is what my book says

#

I understand that it works for perpendicular vectors

#

because of similarity

turbid trellis
# leaden tide

Btw if this is easy and I'm stupid, please say, so I can switch away from preparing for CS and pick a different career, I feel very dumb

leaden tide
#

nah, it's not trivial

stoic pythonBOT
#

Tim O'Brien

forest quiver
#

But this similarity is when these vectors x and y are perpendicular

#

How can a general definition emerge from this?

leaden tide
#

let me get my material on inner products

turbid trellis
stoic pythonBOT
#

Tim O'Brien

forest quiver
#

Like understand that the first equation comes because they are perpendicular vectors

leaden tide
turbid trellis
forest quiver
#

So how do we make this jump with certainty to the general equation for all 2 vectors?

(sorry for the interjection)

leaden tide
#

So, if you don't want that to be impossible, your RHS has to be 0 too

turbid trellis
#

Okay cool, I'm gonna read back and try to understand what I just did haha

leaden tide
forest quiver
#

hmmm

#

and that's what is troubling for me

#

But it's ok

#

I just need to stop being a perfectionist around this and understand that some things I will understand later

#

Im just losing time sitting here thinking for hours

leaden tide
#

nah

#

honestly this doesn't feel like something that requires a lot of prior knowledge to discuss

#

I'll have you note a couple things

forest quiver
#

ok

leaden tide
#

First of all, there is little actually special about the (canonical) dot product

turbid trellis
leaden tide
#

$x_1x_2+2y_1y_2$ is also a valid inner product

stoic pythonBOT
#

Syst3ms

leaden tide
#

So, if you find something like that, you can just subtract rows to get your row of 0s

leaden tide
#

as $|x|=\sqrt{(x|x)}$

forest quiver
#

hmm

stoic pythonBOT
#

Syst3ms

forest quiver
#

x|x /

#

?

leaden tide
#

general notation for an inner product

forest quiver
#

Idk that

#

yet

#

it comes later

leaden tide
#

the dot product is an inner product

forest quiver
#

ohhh

#

Yeah I get that

leaden tide
#

the dot product has interesting properties, and inner products generalize that

#

What I showed is also a valid inner product, it just gives rise to a weird norm

forest quiver
#

Yeah yeah that's the pythagorean theorem

#

the length of the vector is just sqrt of its sides squared

#

So that's where dot product comes from ?

leaden tide
#

Honestly, I don't know enough about its history to tell you that

forest quiver
#

well I appreciate your help

leaden tide
#

But it is true that there are many possible inner products, but that only one of them gives us distance like we expect

forest quiver
#

hmmm

leaden tide
#

namely the dot product

forest quiver
#

ok

#

x^2 = ||x|| ^2

leaden tide
#

say what now?

forest quiver
#

x^2 = x_1^2 + x_2^2

#

when n = 2

leaden tide
#

i dislike that notation of the dot product with itself, but yes

forest quiver
#

Wait so

#

last thing before I go

#

$x\cdot x=x^2$ ?

stoic pythonBOT
#

Tim O'Brien

leaden tide
#

idk, that notation sucks

#

maybe you can define it as such

forest quiver
#

$x\cdot x = x^2 = ||x||^2$

stoic pythonBOT
#

Tim O'Brien

leaden tide
#

but if you do, x^3 doesn't make sense

forest quiver
#

Ok

leaden tide
#

so i would refrain from writing x²

forest quiver
#

Alright

#

thank you

wintry steppe
marble lance
#

I think what confused you is the order of the material. They didn't "go from" the one equation to the other. They said that we know two vectors are perpendicular iff x1y1 + x2y2 = 0. So this quantity x1y1 + x2y2 is of interest because it can tell us when vectors are perpendicular, so let's call that quantity the dot product. @forest quiver

forest quiver
#

hmmm

#

Yeah

leaden tide
#

(and on top of that it fits with the common notion of distance)

marble lance
#

So the x1y1 +x2y2 = 0 thing was just motivating why we care enough about this quantity to give it a name

forest quiver
#

But how does that dot product work

#

when the two triangles don't have 90 degree angle

#

there

#

are they still similar?

#

is the question

#

I think they are right

#

no wait

#

thats dumb

leaden tide
#

A common geometric interpretation of the dot product in the general case is to orthogonally project one of the two vectors onto the other, multiply their norms, and add a negative sign if they point in opposite ways when projected

forest quiver
#

yeah I read about that on stack exchasnge

#

But whaaaaaaaaaaaaaaaaaaaaaaat

#

I mean it makes sense that its a projection

#

because 90 degree will yield 0

#

but idk

#

im not gonna worry about that

#

i cant get stuck on details like this

#

thank you tho

leaden tide
#

The reason why it's orthogonal projection is because the dot product of two perpendicular vectors is 0 :P

#

(you can prove this yourself, if you are convinced that for any vector x, you can split any other vector into one component that is aligned with x, and one that is orthogonal to it)

#

me neither

forest quiver
#

Micheal Penn

#

I just need to udnerstand where this damn projection comes from

#

Some cosine stuff?

#

What's a "signed angle"

lavish jewel
#

it means it's positive if it points in the same direction, negative otherwise

turbid trellis
#

@forest quiver Did you understand the book I am using in the first place ? These questions at the beginning of the book are so damn hard, after only reading 4 pages of linear algebra they ask me to calculate temperatures over a surface using linear systems

forest quiver
#

Ok right

lavish jewel
#

those are the only 2 options you have, since they specify it has to be parallel

forest quiver
#

it's pretty straightforward

#

You just learn the computation

#

and apply it

turbid trellis
#

What things did you do in advance ?

forest quiver
#

Wdym

#

pre reqs?

turbid trellis
#

I feel like I'm not prepared for this book

forest quiver
#

I just did calc 2

#

nowim doing this

turbid trellis
#

Ah okay yeah, I only did calc 1, that might explain it

forest quiver
#

No not rly

#

you dont need calc

#

to do it

#

just learn the computation and follow the steps its actualyl a great book. The one im doing now combines linear alg with calc 3 tho

turbid trellis
#

They barely explain anything except how to solve an system, and then just throw a bunch of questions requiring deep understanding

forest quiver
#

Show me a question

#

Like the one with the temperatures and the nodes

#

?

turbid trellis
forest quiver
#

Yeah this one

#

I loved this one

#

it took me like 30 mins to solve

#

You just follow the instructions

turbid trellis
#

Did you find them hard to do ?

forest quiver
#

The second one you sent isn't hard

#

let me think about the first one

#

Consistent for all possible values

leaden tide
#

Yeah not too hard

forest quiver
#

Does that mean its infinite solutions?

#

no no

leaden tide
#

it has at least one

turbid trellis
#

They mean that it creates consistent system for all values of g and f

#

And ask what that says about c and d

forest quiver
#

The one with the temperature tho was very nice

#

It helped me understand it 10x better

leaden tide
#

but since it's for all possible f and g it might as well be asking that the system be invertible

turbid trellis
forest quiver
#

well if c=1 and d=3 then its not consistent because g neq f

#

Yeah just create the equations

#

and line em up

leaden tide
#

it's more general than that

forest quiver
#

then solve

#

Yeah hmmm

forest quiver
#

yeah yeah

#

hmmm

leaden tide
#

(in general, when can you cancel out an equation by linear combinations)

forest quiver
#

yeah but we dont know the coefs.

lavish jewel
#

no, but you're told the system is consistent

#

which tells you about the coefs

tidal wharf
forest quiver
#

hmmm

forest quiver
#

not sure for 27

#

i did some algebra

#

but I got right back to where I started

leaden tide
#

multiply the first equation, say, by a and see if you can find c and d that make the system not consistent

turbid trellis
#

@forest quiver

#

I nailed it

forest quiver
#

Yeha it's a great one

#

it took me like 45 mins of just computation

turbid trellis
#

I now understand it indeed better

#

Linear algebra is useful when you're calculating stuff which depends on each other

#

In a circular fashion

#

Normal calculations would create infinite loop right ?

#

1 depends on 2 depends on 3 depends on 4 depends on 1

forest quiver
#

It's good when you have multiple linear equations

#

with multiple variables

#

because there exist simple algorithms

#

to isolate variables

#

and solve with ease

turbid trellis
#

Yeah also that

#

In this case it fixed the depends on right ?

forest quiver
#

wait

#

yo

#

was that ur final solution?

turbid trellis
#

T_4=20

#

T_3=115/4

forest quiver
#

no

turbid trellis
#

Fuck

#

I made an arithmetic error somewhere

#

These matrices are turning me crazy haha

forest quiver
#

This problem was so good that I have my sheet of work for this from like 2 weeks ago

#

lying on the floor

#

of my room

#

yes me too

#

Try it again

#

but this time have like a routine

turbid trellis
#

Or I'm just using wolfram alpha, since it was just a arithmetic error

#

Because this part is correct right ?

#

Finally it's fun when I grasp it (kinda)

forest quiver
#

@turbid trellis

#

can ytou explaint his one

#

this one

turbid trellis
#

Not really

#

I haven't done it yet, found it too confusing

#

However I think that they need to be opposites of each other

#

In order to match at each f and g

#

-x+y

#

x-y

#

Forgive me if I'm wrong

forest quiver
#

udj

#

idk

#

theres solutiosn but I wiull check them alter

zinc lava
#

Okay.

#

Linear algebra?

#

How do you usually solve ax +by = f, ca +dy = g using matrices?

#

What matrices will give consistent answers?

limber sierra
stoic pythonBOT
#

Namington

limber sierra
#

(the x instead of a may seem weird, but it's because you wrote ca + dy = g instead of cx + dy = g)

#

if your a, b, c, d, f, g values are actually fixed (so x, y are your variables) then the answer is "you dont solve it using matrices"

#

you use ac + dy = g to solve for y

#

which is middle school algebra

#

and then plug that into ax + by = f and solve for x

#

you COULD use matrices but why overcomplicate it

#

you have a linear equation with 1 unknown

#

solve that

dreamy iron
#

I'm trying to write some notes on Dual Spaces. Anything obvious that I missed, notation wise?

(There's been mention in this chat about covariant and contravariant elements, i'd like to work that in but i don't know how )

wintry steppe
#

hi guys quick q

#

Can someone pls verify this

dreamy iron
#

,rotate

stoic pythonBOT
wintry steppe
#

i think it is right

#

not sure

#

i have another question

#

if anyones around

wraith patio
#

can someone explain what that actually means? v+W

#

or what V/W is

wintry steppe
#

this is d and not A right?

#

result vector i got

#

matrix*

#

sorry

teal grotto
wintry steppe
#

coycoy do u by any chance know if the question i linked is D and not A

teal grotto
wintry steppe
#

im being thrown off by the word row

#

and not pivot in each column

teal grotto
#

let me look

wintry steppe
#

thnk u!

teal grotto
wintry steppe
#

thank u sir

#

do u by any chance know fourier series

#

im struggling w a problem

teal grotto
#

i saw that. i do not know fourier series. sry

wintry steppe
#

coycoy linear algebra god

teal grotto
#

nah nah. thats TTerra

wintry steppe
#

no problem

teal grotto
#

fourth column is 4(1st) + 1(2nd) - 2(3rd)

wintry steppe
#

no just 1 answer

#

@teal grotto i had another quick question

teal grotto
#

ok, go ahead

wintry steppe
#

i think the layout is correct

#

im just not sure where

#

the cos and -sin goes

#

like the layout

teal grotto
#

rotations are not really something i’m too comfortable with yet. i’m sure somebody else could help tho

wintry steppe
#

thank u 😦

#

If someone can verify that would be amazing

#

This is what I’m thinking so

wraith patio
#

i get that if beta is a basis of V and T(beta) is also a basis of W then that would work for gamma=T(beta) but idk the requirements on beta

wintry steppe
#

how can u solve this fourier series?

#

plsss someone ā¤ļø

north anvil
wintry steppe
#

no problem ;/

weak needle
#

Integrate f(x)e^(-in2pix) to get the nth fourier coefficient

#

If you want to know how to do that, the hint is to split the integral from 0 to pi and from pi to 2pi

wintry steppe
#

like

#

im confused

#

in2pix?

#

and why e^

#

like i know the integral of the first part from 0 to pi is

weak needle
wintry steppe
#

-2pi

#

and for the second part its

stoic pythonBOT
#

saketh

wintry steppe
#

its

#

3pi

weak needle
#

So on the whole the integral is pi, correct. That will give the first coefficient

weak needle
# wintry steppe and why e^

Also the way I was talking about fourier series used complex numbers, if you don’t do it that way you can ignore it

#

But you must have some formula for calculating the coefficients, right?

wintry steppe
#

yeah

#

its pi

weak needle
#

What about the other coefficients?

wintry steppe
#

wait is it pi

#

bc i thought for the first coefficient

#

u divide by 2pi

weak needle
#

You divide all coefficients by 2pi

wintry steppe
#

i thought for the bk terms u divide only by pi

weak needle
#

What you divide by depends on how you define the integral

#

When you use e^(inpi) stuff you just divide by the length of the interval always

wintry steppe
#

hmm ok

#

ig my question is

#

how can i consolidate the two functions into one

#

if even possible

#

i think that would make it easier

weak needle
#

Yeah so here is the thing the integral of any function from to 2pi is the sum of the integral from 0 to pi and the integral from pi to 2pi

#

And inside of those two intervals f is just a constant, it would be -2 in the first case and 3 in the second

wintry steppe
#

so

#

-2 + 3 is the integral from 0 to 2pi

#

so -1?

lavish jewel
#

you're supposed to get a function of x

#

after doing the integral, you take those coefficients and get a sum of sines and cosines

weak needle
wintry steppe
#

wait im so confused

#

wym put them into function f

#

f(x) is literally defined as f(x) = -2

#

and f(x) = 3

weak needle
#

I mean instead of f write -2, that is all

lavish jewel
#

right, but only for specific values of x

wintry steppe
#

so integral of -2

lavish jewel
#

so each of the integrals for the fourier coeffs has to be split into two

wintry steppe
#

and integral of 3

#

ah ok

#

so

#

integral of -2 from 0 to pi

#

and integral of 3 from pi to 2pi

#

when i do that

#

i get

#

-2pi for the first

#

and 3pi for the second

lavish jewel
#

integral of -2 * cos (...) from 0 to pi

#

and similarly for 3 * cos(...)

#

and also sine

wintry steppe
#

what should go in the cos though?

lavish jewel
#

what saketh told you above already

weak needle
wintry steppe
#

ah ok

#

so

#

i know ak is = 0

#

so now im trying to find bk

#

there shouldnt be any cos terms in the answer i think

#

i think i got the answer can i verify w u @weak needle

#

or @lavish jewel

lavish jewel
#

you can very yourself

#

plot the sines and cosines and see if it looks like the original thing

weak needle
wintry steppe
#

ok

#

here

#

@weak needle

weak needle
#

cos(kpi) is not always -1, it will depend on wether k is odd or even

wintry steppe
#

in which step

weak needle
#

This is in the calculation of bk, sorry I forgot to say that

wintry steppe
#

what should it be instead then?

weak needle
#

Well, what is cos(kpi)? Just take a few examples and you’ll see

wintry steppe
#

is it k?

weak needle
#

No

wintry steppe
#

i have no idea :/

#

should it just be

#

-4/k

#

and -6/k

lavish jewel
#

dude just do it

#

what's cos (0)

#

what's cos (pi)

#

what's cos (2 pi)

wintry steppe
#

its either 1 or -1

weak needle
#

Yep, and if you know k, how can you figure out wether cos(kpi) is 1 or -1

wintry steppe
#

well

#

in the first one

#

i think its 0 to pi

#

so

#

it must be -1

#

and in the second one

#

its pi to 2pi

#

so it must be

#

1

weak needle
#

Look, the stuff about the integral doesn’t matter here, all I’m asking is, given some integer k, what is cos(kpi). The answer depends on what k is, and what I’m expecting you to tell me is what the relationship is

wintry steppe
#

when k is odd its 1 and when its even its -1

weak needle
#

Exactly

#

So now do you see how the formulas for bk will change depending on wether k is even or odd

wintry steppe
#

yeah

#

so then i think for the first one

#

its 2/pik

#

and then itll be

#

either positive or negative depending on

#

the order

#

and same w

#

the second

#

itll be 3/pik

#

and then depending on the order itll be positive or negative

#

does that sound fine?

weak needle
#

No, if cos(kpi)=1 for example, what is cos(kpi)-cos(0)

wintry steppe
#

cos(kpi)-1

#

so either -1 -1 or 1 -1

weak needle
#

And 1-1=0

wintry steppe
#

yeah

#

so that eliminates all of that

#

even order ones i think

weak needle
#

Yes

wintry steppe
#

so then for the odd ones its

#

-1 - (-1)

#

wait

#

it eliminates odd

#

and keeps even

#

bc i think its -1 and then the cos(0) is being subtracted

#

wait no

#

ur right

weak needle
#

Yeah so the even terms are -4pi/k

wintry steppe
#

ok so

#

for the first func

#

i got this

weak needle
wintry steppe
#

just for š‘“(š‘„)=āˆ’2

#

and so for the second part its

#

and so final answer i think is

weak needle
#

Why is it 2/3pi and 2/5pi and so on? That seems wrong.

wintry steppe
#

its 4/3pi

#

and 4/5pi

weak needle
#

First of all, all the odd k coefficients should be 0 right?

wintry steppe
#

oops

weak needle
wintry steppe
#

other way around

#

wait no

#

it eliminates even

weak needle
#

Yes you were right, I got it mixed up

wintry steppe
#

does that look ok

#

the latest pic is it simplified

weak needle
#

Well now that you got the steps, I think it is a little pointless to verify the addition or whatever, just do what edd said and plot it on a computer or something

#

(Sorry I’m a bit lazy)

wintry steppe
#

u can plot it?

weak needle
#

There should be graphing calculators available online

wintry steppe
#

thank u saketh for ur help and patience i really appreciate it

weak needle
#

No problem

wintry steppe
#

wait quick q

#

for f(x) = 3

#

the second equation

wintry steppe
#

should u integrate from pi to 2pi

#

or 0 to pi

weak needle
#

Pi to 2pi

wintry steppe
#

ok thought so

#

i think i wrote it wrong bc

#

i get 3/2 both ways

weak needle
#

Well the integral from pi to 2pi of 3 is the same as the integral from 0 to pi of 3

wintry steppe
#

ah ok

#

yeah i figured

#

tys

#

m

weak needle
#

Np

umbral birch
#

does anyone know how to solve this?

teal grotto
#

try diagonalizing A first

teal grotto
# umbral birch does anyone know how to solve this?

just in case, A should be diagonalizable over R (checked because its characteristic polynomial has two real roots, 2 and -2, which are the e-vals of A).

once you diagonalize it, you will have a diagonal matrix X and an invertible matrix P so that A = P X P^-1. then A^6 is P X^6 P^-1 and you’re done, since D = X^6 is diagonal

half urchin
#

Is a co-occurrence matrix by default orthonormal?

#

Example^^^

turbid trellis
#

Hey, when having this

#

It is wanted that the pivot is the most right right ? (2, 3)

#

When it's the last pivot in the augmented system

radiant yarrow
#

What does a sequence mean

#

I didn't understand

leaden tide
#

well, it's just a sequence of numbers (or something else)

#

you have a first value, then a second value, then ...

radiant yarrow
#

I didn't get it

#

What is {a_n} denoting

leaden tide
#

the sequence

#

For example {3n} is {0,3,6,9,12,...}

radiant yarrow
#

And I don't understand why they say it's a vector space

#

It just doesn't make sense

leaden tide
#

oh, that

#

Well, first of all do you know that the set of functions from ā„• to F is a vector space?

radiant yarrow
#

No

#

Is it because they defined it?

leaden tide
#

Well, no, it's because it meets the definition

#

You can multiply by scalars

radiant yarrow
#

?

#

Oh

leaden tide
#

You can add functions

#

It's a group for +

#

and generally everything works well

radiant yarrow
#

I don't get what you're saying

leaden tide
#

Do you even know what a vector space is?

wintry steppe
#

a sequence can be considered a vector in a vector space

radiant yarrow
#

set of vectors multiplied by scalar?

#

vectors with inputs from a field F?

wintry steppe
#

its a set of vectors

leaden tide
#

Here's how I understand it

wintry steppe
#

simply put

leaden tide
#

A vector space is a set, along with some given field F. The elements of that set are called "vectors".

#

They're very much analogous to the vectors you see in geometry/physics

#

in fact, they're a generalization of that

radiant yarrow
#

Yes I know. But here you can have n tuple array vectors

#

kinda like vector in n dimensions?

leaden tide
#

yeah?

#

so long as you define + and scalar multiplication well, why would it be an issue?

radiant yarrow
#

So do I know what vector space is?

leaden tide
#

Well, there are some additional properties that vector spaces need to meet

radiant yarrow
#

Yes

#

I've read them

#

commutativity

#

scalar multiplication

leaden tide
#

basically, adding works well

radiant yarrow
#

associativity

#

Yeah

leaden tide
#

you can scale things, and that works how you'd expect

radiant yarrow
#

Yeah

nocturne jewel
#

scalar multiplication isnt necessarily a vector space axiom, it's just part of defining the * operation from VxK to V

leaden tide
#

also a vector space has to be a group for +

radiant yarrow
#

group?

nocturne jewel
#

$\cdot :V\cross\mathbb{K}\to V$ is scalar multiplication

leaden tide
#

I'm confused as to how you got to vector spaces without knowing what a sequence or a group is

stoic pythonBOT
nocturne jewel
leaden tide
#

well that's dumb and stupid

radiant yarrow
#

I know what sequence is. Didn't understand what it meant in LA

nocturne jewel
#

same thing in like calc / other settings

wintry steppe
radiant yarrow
#

I was advised to take LA after calc 1

#

and have calc 2 in parallel

nocturne jewel
#

${a_n}=a_1,a_2,a_3,...$

stoic pythonBOT
leaden tide
#

anyway, group for + just means that there is something like 0, and every element has an additive inverse

#

(which you'd expect vectors to)

radiant yarrow
#

Can't you just say existence of inverses?

nocturne jewel
#

I mean existence of inverses and every element has an additive inverse technically mean different things

#

since you can have operations which define only certain elements having inverses

radiant yarrow
#

Okay

#

Oh yeah, "there exists" is different from "for all"

leaden tide
#

Some of the vector space axioms are really stupid things, like $1\cdot x = x$

radiant yarrow
#

makes sense

stoic pythonBOT
#

Syst3ms

leaden tide
#

(if you multiply by 1 it doesn't change anything, duh)

nocturne jewel
#

yes, identities are stupid

leaden tide
#

by stupid i mean stupidly obvious

radiant yarrow
#

trivial

#

got it

wintry steppe
#

depends on the identity and element

leaden tide
#

as long as you call 1 the multiplicative identity like any reasonable human being, this must work

nocturne jewel
#

Commutativity of +
Associativity of + and *
Existence of additive and multiplicative identities
All elements have an additive inverse

  • and * distribute
#

those are the 8 axioms in few word basically

leaden tide
#

Now bear in mind, as long as all these axioms work, things can be n-tuples, but they can very well not be

#

In fact, that's the point : going beyond tuples, and looking at the concept in its full generality

#

So now, back to the main point

#

Why is the set of functions from ā„• (or any set) to F a vector space?

#

Well, you can define function addition by (f+g)(n)=f(n)+g(n)

#

You can define scalar multiplication by (λ·f)(n)=λf(n) (recall, λ∈F)

#

And it isn't hard to see that all properties mentioned before hold

#

By definition, this set is a vector space (over F, at least)

radiant yarrow
#

But isn't a vector space about representation of n tuples? I don't get when a function is a vector space

#

a set is a vector space right?

#

How is a function one?

leaden tide
#

a function isn't a vector space

#

a set of functions can be

radiant yarrow
#

?

leaden tide
#

Vector spaces are about generalizing the operations and concepts that notably apply to n-tuples

#

In this case we're replacing the n-tuples with functions

wintry steppe
#

just a side note on identities maybe im stating the obvious but in case you miss the point
identities are operations that keep the element of the set as is
so even something as trivial as 1* x=x 1 being the identity for multiplication
the identity of lets say a matrix A with the multiplication identity would be A*(the identity)=A that you would know as In the identity matrix
and the identity of a set M with the union would be M U (identity)=M thus being phi

#

ik your topic is vector spaces but had to point it out

leaden tide
#

formatting

wintry steppe
#

ye discord has this thing for *

radiant yarrow
#

And why doesn't this book explain what's going on

leaden tide
#

Inputs of what?

radiant yarrow
#

You said you're replacing the array of n tuples with functions

#

why isn't there anything explained in the book?

leaden tide
#

I wouldn't know

leaden tide
radiant yarrow
#

let 'f','g','h' be a function. Instead of a vector x =(a_1,a_2,.....) didn't you say a vector x can also be =(f,g,h)?

leaden tide
#

No, that's not my point

radiant yarrow
#

Okay

#

Oh wait got it

leaden tide
#

My point is that you know how we can add and scale vectors?

radiant yarrow
#

x=(N,F)

leaden tide
#

No..?

radiant yarrow
#

yes we can add vectors

leaden tide
#

Which works in a very similar way to vectors

radiant yarrow
#

Okay

#

got it

leaden tide
#

But the two kinds of objects have nothing to do with one another

#

Just so we're clear

radiant yarrow
#

The book sucks

leaden tide
#

anyway, addition and multiplication of sequences is the same thing

#

just with different notation

#

Though, one last tidbit that was in the original definition

wintry steppe
leaden tide
#

It specifically considers sequences that are nonzero for a finite number of terms only

radiant yarrow
#

Bruh then what's the point of the original book

#

I sincerely thought I can be done with LA in 6 months without hassle if I stick to one book

leaden tide
#

yeah but some books aren't good teachers

#

heck, we don't have textbooks here

#

i mean, in highschool we kinda do but we mostly use them for exercises

#

i digress

radiant yarrow
#

I'm using Friedberg,Insel,Spencer BTW. his definitions are marked as "Example:n"

wintry steppe
#

well you can
1-complain about the book and sit in a corner
2-think reasonably and get another book that will solve the lack of competency from the book

radiant yarrow
leaden tide
#

digress, not disagree

radiant yarrow
#

my bad

leaden tide
#

anyhow

radiant yarrow
#

Yeah

leaden tide
#

we still haven't proved that this was a vector space

#

we proved that the set of functions from ā„• to F is

#

But not with that restriction

#

When you have a vector space that is a subset of another vector space (with the same operations), you call that a vector subspace (how creative)

#

Checking if something is a vector space is tiresome

#

You have like 8 axioms and it sucks

#

It's much faster to see if something is a vector subspace of a vector space you already know

#

I chose to start by explaining how the set of functions from ā„• to F was a vector space because it's nice to keep in mind, since it's really general

#

Checking if a set is a vector subspace is easy on the other hand

#

You just have to check :

  • the set is included in the original vector space (duh)
  • 0 is in the set
  • the set is stable by scalar multiplication
  • the set is stable by addition
#

i think you won't have trouble checking that the first two hold

#

the set of sequences that are only nonzero for a finite number of terms also includes the sequence which is always 0

#

it's stable by multiplication because you're not going to change any of the zero terms by multiplying them

#

And it's stable by addition, because you're still going to end up with only a finite (but perhaps larger) amount of nonzero terms

#

So there you have it, the set of sequences with a finite amount of nonzero terms is a vector space

wintry steppe
radiant yarrow
#

I..... umm

leaden tide
#

take your time

radiant yarrow
#

How are functions depicted as vectors?

leaden tide
#

a vector is no longer necessarily just an n-tuple

#

it's an element of a vector space

#

that sounds circular i know (and it kind of is)

#

but really, a vector in the most general sense is only defined by how it transforms with regards to addition and scalar multiplication

#

does it behave well and expectedly with regards to those two?

#

If so, it can be considered a vector

radiant yarrow
#

maybe I'll try tomorrow

#

after some headbanging

#

I heard this subject is supposed to be easy

leaden tide
#

it isn't all that bad, but there are some initial subtleties

#

main take away from this is that a vector is no longer just an n-tuple, it's way more general now

wintry steppe
#

its not as hard to grasp you'll be fine

radiant yarrow
#

Okayy thanks

#

I'll just take a break

wintry steppe
fallen scaffold
#

can someone help me with these

vital plume
#

I have a question. If I have an augmented matrix and almost all the numbers are filled in, but there is an unknown coefficient in the matrix how do I solve for it.

wintry steppe
#

subtract row 1 - row 2 and then solve for h?

#

@vital plume

dusky epoch
#

are you asked to find h such that the system has no solutions?

#

or are you asked to find h such that the system has (420, 69) as a solution?

#

or what

vital plume
#

@dusky epoch has infinite solutions

dusky epoch
#

okay

#

so when a system has infinite solutions, row-reducing it will eventually lead to a row of all zeros

#

act accordingly

wintry steppe
#

An augmented matrix is inconsistent when a row of zeros leads to a number right?

#

if two rows are exactly the same

#

then the system can't be inconsistent

dusky epoch
#

theres no such thing as an augmented system

wintry steppe
#

augmented matrix*

#

sorry

limber sierra
#

the system can still be inconsistent if two rows are the same

#

consider the augmented matrix $\begin{pmatrix}1&1&0\1&1&0\1&1&1\end{pmatrix}$

stoic pythonBOT
#

Namington

wintry steppe
#

Sorry i should've specified more

limber sierra
#

this row reduces to $\begin{pmatrix}1&1&0\0&0&1\0&0&0\end{pmatrix}$ which translates into the system $x + y = 0, 0 = 1, 0 = 0$

stoic pythonBOT
#

Namington

limber sierra
#

and obviously 0 = 1 is a nonstarter

stoic pythonBOT
#

jswatj

limber sierra
#

not necessarily, consider $\begin{pmatrix}0&0&1\0&0&1\end{pmatrix}$

stoic pythonBOT
#

Namington

limber sierra
#

that said, "most of the time" yes

#

in that if a or b are not equal to 0

#

OR if the rightmost column is equal to 0

#

then yes, it will be consistent

#

that is to say, the ONLY inconsistent matrices of that form look like $\begin{pmatrix}0&0&k\0&0&k\end{pmatrix}$ for some $k \neq 0$

stoic pythonBOT
#

Namington

wintry steppe
#

hmm ok

limber sierra
#

("inconsistent matrix" here meaning augmented matrix representing an inconsistent system)

#

right

#

unless a = b = c = 0 or e = f =g = 0

#

then the system isnt inconsistent

#

so?

wintry steppe
#

šŸ˜‚

limber sierra
#

"if these are inconsistent, then theyll be parallel" doesnt mean "if these are parallel, then theyll be inconsistent"

#

all dogs are animals, but not all animals are dogs

#

the contrapositive would be "if these are not parallel, then they are consistent" - which is actually true!

#

(assuming they form planes, at least)

#

if your planes arent parallel they'll cross at some point

#

(more appropriately, some line)

#

the line on which they cross is your solutions

#

right

wintry steppe
#

so its true

limber sierra
#

to form a plane you need all your coefficients to be nonzero

#

yeah

#

i added that but it was redundant in hindsight

#

so forget that bit

#

basically, if we have two planes, then there are these possibilities:

  • The planes are not parallel, meaning they cross at some point [CONSISTENT]
  • The planes are parallel, meaning either:
    --- They are "the same", so they intersect at every point [CONSISTENT]
    --- They are "stacked over each other" but never meet, so they never intersect [INCONSISTENT]
#

not necessarily that the coefficients are the SAME

wintry steppe
#

Ohhh

#

multiples of eachother

limber sierra
#

right!

#

one equation is a scalar multiple of the other (except the constant term/rightmost column of the augmented matrix)

#

sure

wintry steppe
#

Does Riesz's representation theorem work for inner products that are not positive definite?

leaden tide
#

that's a contradiction

twilit anvil
#

can you get an orthonormal basis for such a space

leaden tide
#

but it wouldn't work if it wasn't positive because you need cauchy-schwarz

wintry steppe
leaden tide
#

and at one point the proof uses the fact that <a,z>=0 for all z implies a=0

wintry steppe
leaden tide
#

which uses the definiteness of the inner product

#

and that's not even mentioning the more advanced theorems which may implicitly come from either of those two properties

twilit anvil
#

what are the sort of theorems you are talking about?

#

im thinking if basic ones like triangle inequality, pythagoras, and gram schmidt hold

#

(and i dont rlly think so)

leaden tide
#

idk i just skimmed over the proof

wintry steppe
#

Does results like Riesz's representation theorem exist for spaces with a pseudo inner product?

#

Otherwise, how can one use the "metric" to "lower" or "raise" the indices in an expression as they do in General Relativity where the Lorentzian inner product on the tangent space is a pseudo inner product?

wintry steppe
#

all you need to raise and lower indices is non-degeneracy of the "metric tensor," no? and that's built into the definition

fast ice
#

if you have a free variable after reducing a matrix into row echelon form, does that mean that the vectors that make up the matrix are linearly dependent?

lavish jewel
#

yes

quartz compass
wintry steppe
wintry steppe
marble lance
#

How do you define a topology using pseudo inner products to talk about continuity? Genuine question because I know nothing about pseudo inner products.

wintry steppe
marble lance
#

So then how do you construct the dual space?

wintry steppe
marble lance
#

You need to know what the continuous linear functionals on your space are

#

For which you need a topology to talk about continuity?

wintry steppe
#

Isn't the dual space just bounded linear functionals?

marble lance
#

How do you define bounded then?

wintry steppe
#

And linearity implies continuity, IIRC.