#Linear Algebra

135 messages · Page 1 of 1 (latest)

boreal widget
#

Design a matrix that, when multiplied by a 3D vector ⃗v, swaps the x and y elements and sets z to the average of the three elements of ⃗v.
I have no clue how to do this one any help would be appreciated.

boreal widget
#

Btw im not asking for the answer. I just need someone get me started and explain how to go about it

storm quail
#

write the matrix with unknown entries and see what the info get you, you should get 3 equations that should hold for any x, y, z

boreal widget
storm quail
#

matrix multiplication

boreal widget
#

with what? jsut random terms?

storm quail
#

AX = column vector described in the statement

boreal widget
#

im sorry for the stupid questions but i still dont understand

storm quail
#

np

#

A is your matrix, it has to be 3x3 because it sends a column vector of 3 entries to another one

#

write the entries as unknowns, you want to find them

#

X = column vecotr [x y z]

#

it's your generic 'variable vector'

#

the statement says what is the image AX (as another column vector of 3 entries)

#

so the matricial equation gives you 3 equations that holds for every X, i.e., for every x, y, z

#

because you can choose x, y, z, you can get enough equations to determine A

boreal widget
#

so A is the matrix i'm trying to find. X is supposed to be the column vector where it goes from [x,y,z] -> [y,x, x+y+z/3]. but i still dont understand the later parts do you perhaps have a visual or something i could search up to see how to actually set up my matrix to get those equations

storm quail
#

like this, multiplied by the column vector X gives the other one you wrote

#

do the matrix multiplication AX, this gives the left hand sides of the equations

boreal widget
#

so i do this times x,y,z?

storm quail
boreal widget
#

again sorry for all these stupid questions i just dont get it

#

ahh ok

storm quail
#

it's ok, you're learning the conventions and stuff yet it seems

boreal widget
#

yea its pretty slow in lectures but the hw are on stuff we havent covered

#

so i multiply the 3 x 3 matrix to the x y z?

#

a11​x+a12​y+a13​z = y

#

a21​x+a22​y+a23​z = x

#

a31​x+a32​y+a33​z​ = x+y+z/3 like that?

storm quail
#

ye

#

now think of setting values to x, y, z

#

this must hold for every triple x, y, z

boreal widget
#

im going to be honest idk if i can do that 😅

storm quail
#

u mean you don't know why is that valid?

boreal widget
#

so liek when you say setting values i assign x,y,z random numbers which is always true for the vector we want?

storm quail
#

it's kinda like you have a function f given by f(x) = x^2 for every x,
so you can set x=1, x=2, x=3 to get f(1) = 1, f(2) = 2^2 = 4, f(3) = 3^2 = 9

#

AX = that other vector
works for every X, you can set values to it

#

try x=1, y=z=0 for example and see what you get

boreal widget
#

Like this?

#

The right hand terms is the vector we want not the actual result btw incase i wrote it wrong

storm quail
#

what you want to determine is on the left hand side

boreal widget
#

how do i do that

storm quail
#

look at the system you wrote

#

can you simplify something there? what can you conclude from it?

boreal widget
#

the first system of equation is 1 = 0 which is false? is that how you mean it

#

and if i simplify would i apply rref or something

storm quail
#

on the left side

#

of first equation

storm quail
boreal widget
#

im sorry im confused

storm quail
#

your first equation is
a_{1, 1}*1 + a_{1, 2}*0 + a_{1, 3}*0 = 0

#

can you simplify a_{1, 2}*0? what number can this be?

#

same for a_{1, 3}*0

#

then the first

boreal widget
#

just 0 right?

storm quail
#

yep

#

what about the first summand?

boreal widget
#

a_{1, 1}*1 = 1?

storm quail
#

no

#

2*1 = 2 for instance, 3*1 = 3 etc

boreal widget
#

so just a11?

storm quail
#

yeah

#

so the first equation is giving you what?

boreal widget
#

and the other two rows can be simplified the same way right

storm quail
#

ye

boreal widget
#

a11 = 0

#

a21 = 1

#

a31 = 1/3

storm quail
#

yes

#

so that is what you got with the choice
x=1, y=z=0

#

you can probably guess what other ones can give you the other entries

boreal widget
#

wdym

storm quail
#

other choices of values for x, y, z

boreal widget
#

so now i try like x = 0, y=z=1?

storm quail
#

u could try that, but

#

the more zeros, the better, right

#

more simplifications

boreal widget
#

ahh so do i change it to like x and y = 0 and z = 1?

storm quail
#

yep that's good

#

and then the obvious third one that looks like that

boreal widget
#

when i plug these in do i also swap for the new values i got for a11,a21,a31

storm quail
#

you can plug in the values you got for them

#

but doesn't matter cuz you're setting x=0

boreal widget
#

ohh my bad im stupid

#

so would i get a13 = 0, a23 = 1, a33 = 1/3

#

or just a23 = 1

storm quail
#

not a23 = 1

#

the other two are correct

boreal widget
#

how come a23 isnt 1?

#

and lastly could i x = z = 0, y=1

#

i apologize for asking so many simple and obvious question i just haven't picked up linear algebra that well

#

thank you for being so patient and helping me

storm quail
storm quail
storm quail
boreal widget
#

This is what im writing am i plugging in things incorrectly?

storm quail
#

ignore the red ones lol

boreal widget
#

so a23 = 0

storm quail
#

yeah

boreal widget
#

but the other values i have written on the left are okay right?

#

or would a21 be 0 as well

storm quail
#

no those are ok

#

cuz there you set x=1

boreal widget
#

so now im doing x =z=0, y=1

#

so a12 = 0, a22=1, a32 = 1/3?

storm quail
#

care with the right hand side values

#

a32 = 1/3 is correct

boreal widget
#

a12 = 1, a22 = 0?

storm quail
#

yeah

boreal widget
#

0 0 1

#

1 0 0

#

1/3 1/3 1/3

#

this would be the final matrix/ans?

storm quail
#

2nd and 3rd columns are swapped

#

you found 3rd column after the first, and then the 2nd column

boreal widget
#

Answer top right

#

Does everything look okay?

storm quail
#

yes

#

you can check by multiplying it to column[x y z]

#

ofc it's pretty much what we already done but now they're numbers hehe

#

by the way

#

for future reference, if you have a 3x3 matrix A

#

then A is completely determined by the 3 images
Ae1, Ae2, Ae3

#

where e1 = column[1 0 0], e2 = column[0 1 0], similar for e3
this is the canonical basis for a 3-dimensional vector space R^3 (or C^3, C complex numbers, or any field really)

#

Ae1 is the first column of A, Ae2 is the second, Ae3 is the third

#

this is what we did

#

when setting x=1, y=z=0 we were calculating Ae1, which is the first column of A

#

etc

boreal widget
#

Ohhh ok that makes sense

#

Ill keep that in mind

#

Thank you 🙏🏽 for spending hours with me 😭i would have never got this on my own

#

I appreciate it so much

storm quail
#

nice that i could help! : )))