Jump to content

Linear Algebra trouble

Am obviously missing something really stupid, but how does w = [-3,1,-1,1]T?

 

y=[-1,1,-1,1]T

w = y - ||y||e1 = [-1,1,-1,1]T - 2e1.

So why wouldn't w = [-3,-1,-3,-1]T?

Screen Shot 2017-09-25 at 9.40.02 PM.png

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/
Share on other sites

Link to post
Share on other sites

Just now, MagnesiumPC said:

I'm no math wiz, but this website should help.

http://www.wolframalpha.com/

No.

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10484566
Share on other sites

Link to post
Share on other sites

51 minutes ago, Dash Lambda said:

What is e1? From this it looks to just be [1 0 0 0]T, is it a basis?

Yeah, that's what it is. I realized that last night after playing around with it a bit. 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10486678
Share on other sites

Link to post
Share on other sites

4 hours ago, djdwosk97 said:

Yeah, that's what it is. I realized that last night after playing around with it a bit. 

I take it that means you know why w is equal that now and this topic is closed? Just checking in case you're still confused on something.

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10487609
Share on other sites

Link to post
Share on other sites

29 minutes ago, ono said:

I take it that means you know why w is equal that now and this topic is closed? Just checking in case you're still confused on something.

Yeah, don't go too far though, I might have another question related to something slightly different in a little bit.

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10487706
Share on other sites

Link to post
Share on other sites

On 9/26/2017 at 4:39 AM, djdwosk97 said:

 

y=[-1,1,-1,1]T

w = y - ||y||e1 = [-1,1,-1,1]T - 2e1.

So why wouldn't w = [-3,-1,-3,-1]T?

 

Yep, I completely agree with that.

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10488534
Share on other sites

Link to post
Share on other sites

On 9/27/2017 at 3:46 PM, ono said:

I take it that means you know why w is equal that now and this topic is closed? Just checking in case you're still confused on something.

Any thoughts on this one: (the problem is in the first slide)

 

I looked at the lecture slides, and I'm pretty sure I want to do this to solve for y (to approximate b): (this is called from the second code snippet)

find_y(A,z,W){
  	T = A.T #A transpose
	x = (T*W*A)^(-1)*T*z
	y = A*x
	return y
}

And then I was thinking something like this, but I'm not really sure: 

#A is a given 4x2 matrix
#z is a given 4x1 matrix
#W is a matrix that I pass in that 
###is one of the three options from 
###the first screenshot -- so, let's say 
###W is a 4x4 identity matrix. 

T = A transpose
Wg = T*W*A
y = find_y(W,z,Wg)

 

Screen Shot 2017-09-28 at 3.31.23 PM.png

Screen Shot 2017-09-28 at 3.36.19 PM.png

Screen Shot 2017-09-28 at 3.44.24 PM.png

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10491388
Share on other sites

Link to post
Share on other sites

3 hours ago, djdwosk97 said:

Any thoughts on this one: (the problem is in the first slide)

 

I looked at the lecture slides, and I'm pretty sure I want to do this to solve for y (to approximate b): (this is called from the second code snippet)


find_y(A,z,W){
  	T = A.T #A transpose
	x = (T*W*A)^(-1)*T*z
	y = A*x
	return y
}

And then I was thinking something like this, but I'm not really sure: 


#A is a given 4x2 matrix
#z is a given 4x1 matrix
#W is a matrix that I pass in that 
###is one of the three options from 
###the first screenshot -- so, let's say 
###W is a 4x4 identity matrix. 

T = A transpose
Wg = T*W*A
y = find_y(W,z,Wg)

 

I'm not familiar with this method and I don't have the time to dig into this (I just visit on small breaks at work), but it looks strange to me that you calculate Wg=T*W*A in your second snippet when in your first snippet, you already have T*W*A. Though I'm not sure what the purpose of and where A comes from quickly glancing at the material. EDIT: Oh nevermind, I missed the part that the solution is constrained to be in the column space of some chosen A. So yeah, doesn't your first snippet do all the work? Doesn't seem like you need  the second snippet.

 

Neat your course uses Python, at least that's the only language I'm aware of that uses numpy. I used matlab/octave back in my schooling days.

Edited by ono
Link to comment
https://linustechtips.com/topic/839317-linear-algebra-trouble/#findComment-10491778
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×