Explains how diagonal and non diagonal matrices transform sensor data, scale and mix channels, and how inverses correct vehicle motion for accurate sensor fusion
Back to the census problem.We’ll continue with the same small example to illustrate how matrices apply linear transformations to sensor data. First, examine the sensor readings and the transformation we want to apply:
These are tiny matrices for clarity — real sensor arrays can be large and are usually processed by optimized numerical libraries. In this example:
The 1.1 in the (1,1) position increases recorded distance by 10% (compensating for how the sensor measures distance).
The 1/3 in the (2,2) position scales height down by a factor of 3. The sensor’s maximum measurable height is 3 units, so dividing by 3 brings height into the range [0, 1], making it easier to combine with other sensor channels.
The 1 in the (3,3) position leaves the movement channel unchanged.
Because T is a diagonal matrix, multiplying S × T is equivalent to scaling each column of S by the corresponding diagonal element of T:
First column (distance) multiplied by 1.1
Second column (height) multiplied by 1/3
Third column (movement) multiplied by 1
Column-wise scaling is a useful property of diagonal matrices — much cheaper to compute than a full matrix multiply and easy to reason about.Manual column-wise computation:
For a quick view (rounded to two decimals where useful):
Distance
Height
Movement
5.5
0.83
0
11.0
1.00
0
13.2
0.60
1
Each sensor can apply its own transformation matrix so that all sensors “see” the scene in a common scale and coordinate system after transformation. This is why linear algebra is so useful in sensor fusion and robotics.Exactly!Before we move on, a concise summary: matrix multiplication applies linear transformations (scales, rotations, or mixes of channels) to many datapoints at once. Diagonal matrices scale individual channels independently; non-diagonal matrices can mix channels.Now consider the next complication: the vehicle itself is moving. Can you still trust the raw sensor readings?As the car moves forward, distances to objects change and those objects can appear taller (closer objects take up more of the sensor’s view). If you don’t correct for the car’s motion, your map of the environment will be distorted.Example scenario: the car detects two objects — a tree (further away) and a pedestrian (closer). The sensor stores its observations in a data matrix while the car’s motion is encoded in a movement matrix that describes how camera motion mixes the sensor channels. A non-zero off-diagonal entry (for example, 0.2) indicates some distance information leaked into the height measurement, making objects appear taller when the car moves.
To correct for motion-induced distortion you apply the inverse of the movement matrix to the observed sensor matrix. The inverse “undoes” the mixing and scaling introduced by the vehicle’s motion so that the measurements reflect stable world coordinates again.
Diagonal transformation matrices scale each corresponding column of the data matrix; their inverse rescales columns back to the original units. For non-diagonal movement matrices, the inverse reverses how channels (distance, height, etc.) were mixed.
Next up: we’ll dive into inverse matrices — how to compute them, when they exist, and how they let us remove the effect of motion from sensor readings so the vehicle builds an accurate map of its surroundings.References and further reading