# Linear Algebra

In any generalized algebra, that is, a structure with a commutative associative sum operation with neutral element over which other "product" operations distribute, a functional term is said to be linear in some variable if and only if this term can be expressed as a sum of "monomials" in each of which the variable appears (exactly) once. The sum may contain zero, one, or finitely many (maybe even infinitely many?) monomials. That's what this term refers to.

For instance, assuming + is the sum operator, and * is a product operator, the terms `x*y + 2*x*y*y` and `x + 3*x*y` are linear in x, but not in y: in both terms, each monomial the former term, the second monomial contains two y, while in the latter term the first monomial contains no y.

Linear algebra studies such linear terms and linear transformations (the transformations that preserve the property of linearity), as well as their properties. A slight variant of linear algebra, affine algebra, allows to sum "constant" monomials where the variable doesn't appear, together with linear terms where it appears exactly once.

Linear algebra over commutative fields and rings is an extremely rich branch of mathematics; it constitutes the basis of modern geometry, and has applications in all sciences, from physics to economics to biology. When people talk about "linear algebra", they usually refer to linear algebra over a commutative field, most likely the field of real or complex numbers.

Linear algebra over arbitrary computational term grammars, is also an extremely broad branch of computer science (since when? give references!), with a growing number of applications. In computer science, the word "linear" usually refers to properties of terms where a considered subterm appears only once. Computer scientists name "linear logic" this branch of their science that studies such generalized linear algebras (Note: this is a broad generalization that should not be taken too literally, especially technically. Linear logic is actually a very narrowly-defined subject that just happens to use a same concept).