less_retarded_wiki/linear_algebra.md

24 lines
2.5 KiB
Markdown
Raw Normal View History

2022-04-09 20:51:52 +02:00
# Linear Algebra
2022-05-23 16:24:35 +02:00
In [mathematics](math.md) linear algebra is an extension of the classical elemental algebra ("operations with numbers/variables") to [vectors](vector.md) and [matrices](matrix.md) ("arrays of numbers"). It is a basic tool of advanced mathematics and [computer science](computer_science.md) (and many other sciences) and at least at the very basic level should be known by every [programmer](programmer.md).
Why is it called *linear* algebra? Basically because it deals with [linear equations](linear.md) which is kind of about proportionality, function plots being lines etc. A mathematician will probably puke at this explanation but it gives some intuition :)
2022-04-09 20:51:52 +02:00
## The Basics
2022-05-23 16:24:35 +02:00
In "normal" algebra our basic elements are [numbers](number.md); we learn to add then, multiply then, solve equation with them etc. In linear algebra we call these "single numbers" [scalars](scalar.md) but also add more complex elements: [vectors](vector.md) and [matrices](matrix.md) and we learn to perform similar operations with them, even though they sometimes behave a bit differently.
2022-04-09 20:51:52 +02:00
Vectors are basically sequences ([arrays](array.md)) of numbers, e.g. a vector of length 3 may be [1.5, 0, -302]. A matrix can be seen as a [two dimensional](2d.md) vector (a 2D array of numbers), e.g. a 2x3 matrix may look like this:
```
|1 2.5 -10|
|24 -3 0 |
```
2022-05-23 16:24:35 +02:00
Why work with vectors and matrices? Because these can represent certain things we encounter in math and programming better than numbers, e.g. vectors may represent points in space or velocities with directions and matrices may represent transformations.
2022-04-09 20:51:52 +02:00
2022-08-01 17:33:00 +02:00
With vectors and matrices we can perform similar operations as with "normal numbers", i.e. addition, subtraction, multiplication, but there are also new operations and some operations may behave differently. E.g. when dealing with vectors, there are multiple ways to "multiply" them: we may multiply a vector with a scalar but also a vector with vector (and there are multiple way to do this such as [dot product](dot_product.md) and [cross product](cross_product.md)). Matrix multiplication is, unlike multiplication of real numbers, non-[commutative](commutativity.md) (A times B doesn't necessarily equal B times A), but its still [distributive](distributivity.md). We can also multiply vectors with matrices but only those that have "compatible sizes". And we can also solve equations and systems of equations which have vectors and matrices in them.
## See Also
- [analytic geometry](analytic_geometry.md)