Skip to main content
Interactive 3D/State Space Model Foundations - A, B, C, D Matrices
State Space Equations (Discrete Recurrence)
x[k+1] = A·x[k] + B·u[k]
y[k] = C·x[k] + D·u[k]
System Matrices (dim=3, showing up to 3×3)
A
-0.3
0.1
0.0
0.1
-0.4
0.1
0.0
0.1
-0.5
State transition
B
0.9
1.0
0.6
Input proj.
C
0.3
-0.2
-0.5
Output proj.
D
0.1
Feedthrough
Output y[k] - Input: Step
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Controls
State Dim N
Dim3
Mode
Input Signal
Step
Sine
Impulse
SSM: A linear dynamical system with learnable matrices A,B,C,D. The A matrix controls memory decay. Mamba makes A,B,C input-dependent - enabling selective state spaces.

State Space Model Foundations - A, B, C, D Matrices - Interactive Visualization

State Space Models (SSMs) are a class of sequence models derived from control theory. The core equations are x'=Ax+Bu (state transition) and y=Cx+Du (output). The A matrix controls memory decay, B controls how inputs affect state, C projects state to output, and D is a direct feedthrough. SSMs can be trained as convolutional networks (parallel) but run as recurrent networks (fast inference). Mamba extends this by making A, B, C input-dependent - enabling selective state spaces.

  • A matrix: controls how state evolves - eigenvalues must be stable (magnitude < 1 for discrete)
  • B matrix: projects input u into the state space
  • C matrix: projects hidden state x to output y
  • Continuous mode: ODE x'=Ax+Bu; Discrete mode: recurrence x[k+1]=Ax[k]+Bu[k]
  • Convolution kernel K[k]=C·A^k·B - the entire SSM can be parallelized via this kernel during training

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.