Live data from Hacker News

Ask HN: Should I learn Linear Algebra? Why?

news.ycombinator.com

1–9 of 9 posts

Re: Ask HN: Should I learn Linear Algebra? Why?

#3
Computer Graphics; Data Science; and ML/AI are your obvious ones. Most engineers can benefit from it, because all you're doing is modelling systems; take a look at how Spice programs model electrical circuits as an example of this. There's a lot of math that needs an understanding of vector spaces to grasp the concepts. Most Lin Alg books and courses that are more geared towards graduate level students (so folks with the basic lin alg info under their belt) work on generalization, and it directly leads to some interesting applications in probability, graph theory, number theory, and a whole host of other more advanced topics. There's even whole programs built around solving things from a linear algebra perspective (see MatLab for example)

Linear algebra is just a tool that fits nicely in a lot of computer science and various engineering toolboxes.

Re: Ask HN: Should I learn Linear Algebra? Why?

#4
For the everyday developer messing with data, there are some nice concepts to know.

I'm talking super basic like when is it useful to transpose a dataset, to apply some function, then transpose back?

Being congnizant of the data-shape is something that comes as a side effect of studying linalg and matrices.

Just recognizing things like that will be the most value add unless you get into some domain specific requirements (games/engineering software).

Re: Ask HN: Should I learn Linear Algebra? Why?

#5
Here's a fun problem which can be solved by linear algebra.

You have a group of 20 people. Each of them rates how much they like everyone else, on a scale of 1 to 10. Your task is to figure out how popular everyone is, again on a scale from 1 to 10. Someone's "popularity" is based on how much the other kids like them, except the cool kids' opinion count more. You're popular if the popular people like you.

Can you mathematically compute how popular everyone is? Is the solution unique? Or might there be more than one solution? The problem seems hopelessly circular -- you have to figure out who is popular before you can figure out who is popular -- but actually it turns out to be a standard linear algebra problem.

Re: Ask HN: Should I learn Linear Algebra? Why?

#6
post #5

Here's a fun problem which can be solved by linear algebra. You have a group of 20 people. Each of them rates how much they like everyone else, on a scale of 1 to 10. Your task is to figure out how popular everyone is, again on a scale from 1 to 10. Someone's "popularity" is based on how much the other kids like them, except the cool kids' opinion count more. You're popular if the popular people like you. Can you mat…

Ooh that's cool - can you elaborate on the solution?

Re: Ask HN: Should I learn Linear Algebra? Why?

#7
post #6
post #5

Here's a fun problem which can be solved by linear algebra. You have a group of 20 people. Each of them rates how much they like everyone else, on a scale of 1 to 10. Your task is to figure out how popular everyone is, again on a scale from 1 to 10. Someone's "popularity" is based on how much the other kids like them, except the cool kids' opinion count more. You're popular if the popular people like you. Can you mat…

Ooh that's cool - can you elaborate on the solution?

Suppose that the popularities of everyone are p_1, p_2, through p_20. Then, if you write "~" for "is proportional to", you get a bunch of equations like

0p_1 + 8p_2 + 4p_3 + ... + 4p_20 ~ p_1

7p_2 + 0p_2 + 7p_3 + ... + 9p_20 ~ p_2

...

if you assume that Person #1 is rated 8 by Person #2, 4 by Person #3, and so on, and that nobody rates themselves.

Anyway, you can combine these into a matrix equation

Mv = cv

where M is the matrix with all the popularity ratings that students give each other, v is a vector which says how popular everyone is, and c is a constant. M is known, and you have to solve it for v and c.

Anyway, v is an eigenvector of the matrix M, and finding them is a standard problem.

https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors

The same idea shows up all over the place in linear algebra.

Re: Ask HN: Should I learn Linear Algebra? Why?

#8
post #7
post #6

Earlier quoted context omitted.

Ooh that's cool - can you elaborate on the solution?

Suppose that the popularities of everyone are p_1, p_2, through p_20. Then, if you write "~" for "is proportional to", you get a bunch of equations like 0p_1 + 8p_2 + 4p_3 + ... + 4p_20 ~ p_1 7p_2 + 0p_2 + 7p_3 + ... + 9p_20 ~ p_2 ... if you assume that Person #1 is rated 8 by Person #2, 4 by Person #3, and so on, and that nobody rates themselves. Anyway, you can combine these into a matrix equation Mv = cv where M i…

I still can't grasp the concept of eigenvalues and eigenvectors, any references that have good and intuitive explanations, thanks

Re: Ask HN: Should I learn Linear Algebra? Why?

#9
post #7

Earlier quoted context omitted.

Suppose that the popularities of everyone are p_1, p_2, through p_20. Then, if you write "~" for "is proportional to", you get a bunch of equations like 0p_1 + 8p_2 + 4p_3 + ... + 4p_20 ~ p_1 7p_2 + 0p_2 + 7p_3 + ... + 9p_20 ~ p_2 ... if you assume that Person #1 is rated 8 by Person #2, 4 by Person #3, and so on, and that nobody rates themselves. Anyway, you can combine these into a matrix equation Mv = cv where M i…

I still can't grasp the concept of eigenvalues and eigenvectors, any references that have good and intuitive explanations, thanks

The videos of 3blue1brown are very good:

https://www.youtube.com/watch?v=PFDu9oVAE-g