gives us the unit of the entry (i, j) in the matrix A. Furthermore, the ~ operator transposes a vector / matrix and inverts its units, i.e
Then we need another result from the book which says that the units in any multipliable matrix A can be written as , i.e. the units of the matrix entries can be described by the outer product of 2 vectors a and b where a is a column vector and b^\sim is a row vector with its units inverted.
Answer to 4): the units of the inverse of a matrix A are given by which means that the units are the element-wise reciprocal of the original units as already proposed in the original question.
Regarding 3): Yes, your rules regarding matrix multiplication are correct if the inner units are identical and thus cancel out, i.e. .
However, it would also be possible to multiply matrices where the inner column/row units are dimensionally parallel: (here b/c informally refers to be the common unit factor by which c has to be multiplied to obtain c)
Regarding 2): Usually each row or column of a matrix refers to a specific physical quantity which induces the canonical representation for the row and column units. As an example, consider a (x,y) position covariance matrix in a Kalman Filtering application. There, it is clear that the rows and columns describe x- and y-position in a certain physical unit, e.g. all row and column units are [m], leading to a unit of [m^2] for each of the matrix elements. It would also be possible to use [m/s] and [s*m] as row and column units which would also lead to a unit of [m^2] for each element.
However, it should be clear from the problem description that the first representation is the more meaningful.
Regarding 5): There is the book by George W. Hart and a very short paper with a few key results from the book https://www.georgehart.com/research/tdm.ps . As far as implementations in software are concerned, this talk from Meeting C++ 2021 https://www.youtube.com/watch?v=4LmMwhM8ODI describes the implementation of a library that is capable of annotating matrices and vectors with physical units where all checks are done at compile time. The presented library is also able to fully handle the Discrete Kalman Filter example that is described in one of the other answers.
I think that good real-world example - an answer to your question No 1 - could be Discrete Kalman Filter implementation. In general, its equations operate on tuples and matrices where some of them might represent values that correspond to physical units.
As long as there is a need for multidimensional Kalman filter calculation, where estimated results are not homogeneous in value type, it looks to me that there will be are inversions and transpositions, as well as multiplication between matrices having certain (symmetrical) mixture of values representing different physical things on their elements.
I've just touched the problem when trying to implement sensor fusion algorithm using DKF with C++ and strongly typed value representation in the code.
There are plenty of Kalman filter implementations where developers simply use vectors and matrices of integers, floats, doubles etc, but I'd like to keep track of dimension of every values used and then the issue appeared.
Unfortunately, I'm quite fresh to the problem (still working on it), so I'm not yet able to help you with answers 2 to 5 right now :-/