How does linear algebra over the octonions and other division algebras work? An interesting question, which has been discussed in many forms on this site, is how many results from the study of linear algebra over vector spaces carries over when we allow the scalars to form an algebraic structure more general than a field.

For example, if you stop requiring multiplicative commutativity and allow the scalars to form an arbitrary division ring, then a surprising amount of structure carries over unchanged, as discussed here: you lose the notion of the determinant and eigenvalues become more subtle, but you still have unique basis cardinality, Gaussian elimination, the Rouché-Capelli theorem, and matrix representations of arbitrarily linear maps between finite-dimensional modules. A similar story applies if you allow the scalars to form an arbitrary commutative ring. However, all hell can break loose if you drop commutativity and division: a module over an arbitrary ring does not necessary have an invariant basis number, so much of the structure of linear algebra over fields immediately falls apart.

What happens if you further generalize the scalars' division ring to be a division algebra that is not associative? How much structure do you lose if you give up associativity but preserve division?

To be concrete, consider generalized modules with the octonions as their "scalars". (A precise definition of what I mean is given in this question, together with the requirement $(rs)\cdot x = r \cdot (s \cdot x)$.)


Do these modules have a notion of invariant basis number?
If so, can arbitrary linear maps between finitely generated such generalized modules be represented by matrices? Are the matrix elements given by the usual formula $A(\hat{e}_j) = \sum_i A_{ij} \hat{e}_i$?
As Billy points out, the rule $(rs)\cdot x=r\cdot(s\cdot x)$ implies that $(rs)t$ and $r(st)$ will act identically on your module.

According to Wikipedia's multiplication table we have
$$ e_1(e_3e_5) = -e_1e_6 = e_7 \\
(e_1e_3)e_5 = -e_2e_5 = -e_7 $$
so we must have
$$ e_7\cdot x = -e_7\cdot x $$
whence (by distributivity)
$$ 2e_7\cdot x = 0 $$
and by dividing by $2e_7$,
$$ 1\cdot x = 0 $$
Since the module axioms also require $1\cdot x$ to be $x$, this means that the only module that satisfies all of your rules is $\{0\}$ -- not very exciting. Thus:


1. Yes, the basis number is invariant. Every basis contains exactly $0$ vectors.
2. Yes, if you allow $0\times 0$ matrices.
You definitely want to change your definition of what a module is, since
$(r s) * x = r * (s * x)$  for all $r, s$ in skew field $K$, $x$ in module $M$
is clearly a version of the associative law, which doesn't work for non-associative alternative algebras (like alternativ-körper / alternative skew fields like the octonions).
I'm assuming you know about the commutator
$[a, b] = a b - b a$
and the associator
$[a, b, c] = (a b) c - a (b c)$
already. Sometimes the associator is written as $\{a, b, c\}$ instead, if $[a, b, c]$ is already used for the &quot;jacobian&quot; $[[a, b], c] + [[b, c], a] + [[c, a], b]$. But let's not complicate things too much.
Let's say that the above mentioned left module law is part of the definition of an associative left module.
For an alternative left module we instead want (works in characteristic not 2):
$[r, s, x] + [s, r, x] = 0$,
where $[r, s, x]$ is the left &quot;associator&quot; $(r s) * x - r * (s * x)$, which vanishes for associative modules.
In characteristic 2 (yes there are split octonions in char 2 and other finite characteristics, not really fields, but almost, they are composition algebras) we instead have to use
$[r, r, x] = 0$
since this gives us
$0 = [r + s, r + s, x] = [r, r, x] + [r, s, x] + [s, r, x] + [s, s, x] = [r, s, x] + [s, r, x]$ as desired.
The other direction doesn't hold though. This because in characteristic 2,
a + b = 0 i.e. a = -b is the same as a = b, not forcing
a = -a =&gt; a = 0, thus the desired left alternativity
r^2 * x = r * (r * x) is not guaranteed otherwise.
Similarly for an alternative right module we use:
[x, r, s] + [x, s, r] = 0 using the right &quot;associator&quot; [x, r, s] = (x * r) * s - x * (r s)
or
[x, r, r] = 0.
I have know idea if the notion of an alternative &quot;middle module&quot;:
[s, x, r] + [r, x, s] = 0 or [r, x, r] = 0
is useful in and of itself, but the middle &quot;associator&quot; [s, x, r] = (s * x) * r - s * (x * r) is definitely useful.
For an alternative bi-module we need more, namely the law
[x, r, s] = [r, s, x] = [s, x, r]
which is not deducible from the above.
This law together with either one of left alternativity, right alternativity or middle alternativity (plus distributivity), give us the other above laws, and a feasible notion of alternative bi-module we seek.
We could go one step further and define a central field of our alternative skew field, that our module must be a vector space over. Or, if we like, a nuclear skew field that our module must be an associative module over.
Nuclear elements n are such that for all r, s :
(n r) s = n (r s)  {left nuclear},
(r n) s = r (n s)  {middle nuclear} and
(r s) n = r (s n)  {right nuclear}.
All such elements n together form the left nucleus, middle nucleus or right nucleus of a Moufang loop or alternative algebra,
and all such elements n satisfying all these three conditions (the intersection of these nuclei) give us simply the nucleus of the Moufang loop or alternative algebra, this nucleus is always a group or associative algebra, respectively;
by using similar laws for certain nuclear scalars acting on the module, we ensure that our base skew field (if any) of certain such scalars for our alternative algebra is functioning as a base skew field for our module as a bi-vector space (left and right vector space, being an associative bi-module) over this skew field. This idea is probably pretty alien if not combined with the next one.
Central elements c are such that for all r :
c r = r c
; these form the commutative center.
The intersection of the nucleus and the commutative center form simply the center, which is always an Abelian group or commutative associative algebra, depending on context;
by using similar laws for (nuclear) central scalars acting on the module we ensure that our base field of certain such scalars for our alternative algebra is functioning as a base field for our module as a vector space over this field.
In the ordinary field case we get (for a, b in base field F; r, s in algebra K; x in module M):
(a r) * x = a (r * x) = r * (a x)
and
(a x) * r = a (x * r) = x * (a r)
for all base field scalars a, algebra scalars r, and module elements x.
Noting that a r = r a, (a r) s = a (r s), (r a) s = r (a s), (r s) a = r (s a), (a b) x = a (b x) and redundantly a x = x a.
In the skew field case we get (for a, b in base skew field F; r, s in algebra K; x in module M):
(a r) * x = a (r * x)
(r a) * x = r * (a x)
(r * x) a = r * (x a)
(a x) * r = a (x * r)
(x a) * r = x * (a r)
(x * r) a = x * (r a).
Noting that (a r) s = a (r s), (r a) s = r (a s), (r s) a = r (s a), (a b) x = a (b x), (a x) b = a (x b) = a x b and (x a) b = x (a b).
Note that the action of an associative algebra over an alternative (left, right, bi-) module may not be associative, and the action of a commutative associative algebra over an associative (left, right, bi-) module may not be commutative.
Thus e.g. the quaternions, as well as the complement of the complex numbers in the quaternions, are (non-commutative) associative bi-modules for the complex numbers.
And the octonions, as well as the complement of the quaternions in the octonions, are (non-associative) bi-modules for the quaternions.
The octonions, the octonion complement of the quaternions, and the octonion complement of the complex numbers are (non-associative) bi-modules for the complex numbers as well.
Using either the real numbers or the rational numbers (or any field in between) as the base field.
This paper is a wee little bit sloppy but still rigorous enough to give a good notion about what bimodules over octonions are, or ought to be:
https://arxiv.org/abs/2007.05375