Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is linear algebra used in algorithms?

Tags:

Several of my peers have mentioned that "linear algebra" is very important when studying algorithms. I've studied a variety of algorithms and taken a few linear algebra courses and I don't see the connection. So how is linear algebra used in algorithms?

For example what interesting things can one with a connectivity matrix for a graph?

like image 469
MrDatabase Avatar asked Jul 06 '09 04:07

MrDatabase


People also ask

How linear algebra is used in AI?

Linear algebra is the building block of machine learning and deep learning. Understanding these concepts at the vector and matrix level deepens your understanding and widens your perspective of a particular ML problem. These computations can be performed using a for-loop for 100 iterations.

How is linear algebra used in programming?

Linear algebra provides concepts that are crucial to many areas of computer science, including graphics, image processing, cryptography, machine learning, computer vision, optimization, graph algorithms, quantum computation, computational biology, information retrieval and web search.

Is algebra used in algorithms?

Linear algebra is also important in many algorithms in computer algebra, as you might have guessed.

How linear algebra is used in cryptography?

The matrix can represent an entire alphabet and its encrypted counterpart. Thus, linear algebra serves as a tool to manipulate simple shift ciphers, and more generally, affine ciphers, which multiply some integer k by y as well as perform a shift l (ky+l=x).


2 Answers

Three concrete examples:

  • Linear algebra is the fundament of modern 3d graphics. This is essentially the same thing that you've learned in school. The data is kept in a 3d space that is projected in a 2d surface, which is what you see on your screen.
  • Most search engines are based on linear algebra. The idea is to represent each document as a vector in a hyper space and see how the vector relates to each other in this space. This is used by the lucene project, amongst others. See VSM.
  • Some modern compression algorithms such as the one used by the ogg vorbis format is based on linear algebra, or more specifically a method called Vector Quantization.

Basically it comes down to the fact that linear algebra is a very powerful method when dealing with multiple variables, and there's enormous benefits for using this as a theoretical foundation when designing algorithms. In many cases this foundation isn't as appearent as you might think, but that doesn't mean that it isn't there. It's quite possible that you've already implemented algorithms which would have been incredibly hard to derive without linalg.

like image 98
Emil H Avatar answered Oct 11 '22 10:10

Emil H


A cryptographer would probably tell you that a grasp of number theory is very important when studying algorithms. And he'd be right--for his particular field. Statistics has its uses too--skip lists, hash tables, etc. The usefulness of graph theory is even more obvious.

There's no inherent link between linear algebra and algorithms; there's an inherent link between mathematics and algorithms.

Linear algebra is a field with many applications, and the algorithms that draw on it therefore have many applications as well. You've not wasted your time studying it.

like image 26
Michiel Buddingh Avatar answered Oct 11 '22 12:10

Michiel Buddingh