Controllability and Observability Matrix Calculator

Build the controllability and observability matrices for a 2-state linear system and check Kalman's rank test with the determinants of each.

🧮 Controllability and Observability Matrix Calculator
a₁₁
a₁₂
a₂₁
a₂₂
b₁
b₂
c₁
c₂
Controllability
Observability
det(Co)
det(Ob)
Step-by-step working

🧮 What is Controllability and Observability?

Controllability and observability are two fundamental properties of a state-space linear system that determine whether standard control and estimation techniques can even be applied to it. Controllability asks whether some input signal can drive every internal state to any desired value in finite time. Observability asks whether the full internal state can be reconstructed purely from watching the output over time. Kalman's rank test, developed by Rudolf Kalman in the early 1960s, checks both algebraically using two matrices built directly from the system's A, B, and C matrices.

Control engineers check controllability and observability before committing to a design approach. A controls engineer designing a linear-quadratic regulator (LQR) or a simple pole-placement state-feedback controller first confirms the system is controllable, since neither design method works if some internal mode simply cannot be influenced by the input. An engineer building a Kalman filter or Luenberger observer to estimate states that cannot be measured directly first confirms the system is observable, since an unobservable mode can never be reconstructed from the output no matter how clever the estimator. A student verifying a hand-derived state-space model uses this calculator as an independent cross-check of matrix arithmetic that is easy to get wrong by hand.

A common misconception is that a system's controllability and observability status are somehow linked, that a controllable system must also be observable, or vice versa. In reality, the two properties are checked with entirely separate matrices, controllability depends only on A and B, observability depends only on A and C, and all four combinations (both, neither, or only one) occur in real systems. Another misconception is that instability implies uncontrollability or unobservability, these are unrelated concepts entirely, an unstable system can be perfectly controllable and observable, and a stable system can fail either test.

This calculator takes the eight scalar entries of a 2-state system's A, B, and C matrices, builds the controllability matrix Co = [B | AB] and the observability matrix Ob = [C; CA], computes both determinants, and returns a clear controllable/uncontrollable and observable/unobservable verdict for each, with every intermediate matrix product shown step by step.

📐 Formula

Co = [B | AB]    Ob = [C; CA]
AB = A × B: AB1 = a11b1 + a12b2, AB2 = a21b1 + a22b2
det(Co) = b1AB2 − AB1b2. The system is controllable if and only if det(Co) ≠ 0.
CA = C × A: CA1 = c1a11 + c2a21, CA2 = c1a12 + c2a22
det(Ob) = c1CA2 − CA1c2. The system is observable if and only if det(Ob) ≠ 0.
This calculator treats any determinant with absolute value at or below 1×10−9 as zero, to avoid floating-point rounding from producing a false controllable or observable verdict.
Example: A = [[0,1],[−13,−4]], B = [[0],[1]], C = [13, 0] → det(Co) = −1 (controllable), det(Ob) = 169 (observable).

📖 How to Use This Calculator

Steps

1
Enter the state matrix A. Type the four entries a11, a12, a21, a22 of the 2x2 state matrix.
2
Enter the input matrix B. Type the two entries b1, b2 of the 2x1 input matrix.
3
Enter the output matrix C. Type the two entries c1, c2 of the 1x2 output matrix.
4
Read the controllability and observability verdicts. See the controllability and observability matrices, their determinants, and a controllable/observable verdict for each.

💡 Example Calculations

Example 1 — Controllable Canonical Form (Controllable and Observable)

A = [[0,1],[−13,−4]], B = [[0],[1]], C = [13, 0]

1
AB1 = 0×0 + 1×1 = 1, AB2 = −13×0 + −4×1 = −4
2
det(Co) = 0×(−4) − 1×1 = −1Controllable
3
CA1 = 13×0 + 0×(−13) = 0, CA2 = 13×1 + 0×(−4) = 13
4
det(Ob) = 13×13 − 0×0 = 169Observable
det(Co) = −1 (Controllable), det(Ob) = 169 (Observable)
Try this example →

Example 2 — B Aligned With an Eigenvector (Uncontrollable, Observable)

A = [[1,0],[0,2]], B = [[1],[0]], C = [1, 1]

1
AB1 = 1×1 + 0×0 = 1, AB2 = 0×1 + 2×0 = 0
2
det(Co) = 1×0 − 1×0 = 0Uncontrollable (B is aligned with the eigenvector for eigenvalue 1, so the mode for eigenvalue 2 can never be reached)
3
CA1 = 1×1 + 1×0 = 1, CA2 = 1×0 + 1×2 = 2
4
det(Ob) = 1×2 − 1×1 = 1Observable
det(Co) = 0 (Uncontrollable), det(Ob) = 1 (Observable)
Try this example →

Example 3 — C Blind to a State (Controllable, Unobservable)

A = [[1,0],[0,2]], B = [[1],[1]], C = [1, 0]

1
AB1 = 1×1 + 0×1 = 1, AB2 = 0×1 + 2×1 = 2
2
det(Co) = 1×2 − 1×1 = 1Controllable
3
CA1 = 1×1 + 0×0 = 1, CA2 = 1×0 + 0×2 = 0
4
det(Ob) = 1×0 − 1×0 = 0Unobservable (C only reads the first state, so the second state's independent dynamics are invisible at the output)
det(Co) = 1 (Controllable), det(Ob) = 0 (Unobservable)
Try this example →

❓ Frequently Asked Questions

What is controllability in control systems?+
A linear system is controllable if, starting from any initial state, some input signal can drive the state to any desired value in a finite amount of time. Kalman's rank test checks this algebraically: for a 2-state system, the system is controllable if and only if the controllability matrix Co = [B | AB] has a nonzero determinant.
What is observability in control systems?+
A linear system is observable if the complete internal state can be determined purely from watching the output over a finite time window, without directly measuring the state. For a 2-state system, this holds if and only if the observability matrix Ob = [C; CA], C stacked above CA, has a nonzero determinant.
How do you build the controllability matrix?+
First compute AB, the matrix A multiplied by the input vector B: AB1 = a11*b1 + a12*b2, AB2 = a21*b1 + a22*b2. Then form Co by placing B as the first column and AB as the second column. The system is controllable exactly when det(Co) = b1*AB2 minus AB1*b2 is nonzero.
How do you build the observability matrix?+
First compute CA, the row vector C multiplied by the matrix A: CA1 = c1*a11 + c2*a21, CA2 = c1*a12 + c2*a22. Then form Ob by placing C as the first row and CA as the second row. The system is observable exactly when det(Ob) = c1*CA2 minus CA1*c2 is nonzero.
Can a system be controllable but not observable, or vice versa?+
Yes, the two properties are checked with entirely separate matrices (Co depends only on A and B, Ob depends only on A and C) and are logically independent. A system can be controllable and observable, controllable but not observable, observable but not controllable, or neither, all four combinations occur in real systems.
What does it mean if a system is uncontrollable?+
It means at least one internal state (or combination of states) cannot be influenced by any choice of input signal, no matter how it is designed. This commonly happens when the input matrix B happens to align with an eigenvector of A, decoupling that mode from the input entirely, a case this calculator can demonstrate directly with the right coefficients.
What does it mean if a system is unobservable?+
It means at least one internal state (or combination of states) has no effect on the measured output, so no amount of watching the output over time can reveal what that state is doing. This can happen even in an otherwise well-designed system if the output matrix C simply does not couple to that internal mode.
Why does controllable canonical form guarantee controllability?+
Controllable canonical form, used by the sibling State Space Representation Calculator on this site, builds A and B in a fixed structural pattern (B always [[0],[1]], A's top row always [0, 1]) that always produces a nonzero controllability determinant, regardless of the specific numerator or denominator coefficients chosen. This is precisely why the form carries the name it does.
Why do controllability and observability matter for control system design?+
Controllability determines whether a state-feedback controller (like pole placement or an LQR) can even be designed at all, since these methods require driving every state to a desired value. Observability determines whether a state estimator (like a Kalman filter or Luenberger observer) can reconstruct the full internal state from the available outputs, essential when not every state can be measured directly.
Does the order of A, B, C matter when checking controllability and observability?+
Yes. Controllability depends only on the pair (A, B), the output matrix C plays no role at all in det(Co). Observability depends only on the pair (A, C), the input matrix B plays no role at all in det(Ob). Changing B never affects the observability verdict, and changing C never affects the controllability verdict.

What is controllability in control systems?

A linear system is controllable if, starting from any initial state, some input signal can drive the state to any desired value in a finite amount of time. Kalman's rank test checks this algebraically: for a 2-state system, the system is controllable if and only if the controllability matrix Co = [B | AB] has a nonzero determinant.

What is observability in control systems?

A linear system is observable if the complete internal state can be determined purely from watching the output over a finite time window, without directly measuring the state. For a 2-state system, this holds if and only if the observability matrix Ob = [C; CA], C stacked above CA, has a nonzero determinant.

How do you build the controllability matrix?

First compute AB, the matrix A multiplied by the input vector B: AB1 = a11*b1 + a12*b2, AB2 = a21*b1 + a22*b2. Then form Co by placing B as the first column and AB as the second column. The system is controllable exactly when det(Co) = b1*AB2 minus AB1*b2 is nonzero.

How do you build the observability matrix?

First compute CA, the row vector C multiplied by the matrix A: CA1 = c1*a11 + c2*a21, CA2 = c1*a12 + c2*a22. Then form Ob by placing C as the first row and CA as the second row. The system is observable exactly when det(Ob) = c1*CA2 minus CA1*c2 is nonzero.

Can a system be controllable but not observable, or vice versa?

Yes, the two properties are checked with entirely separate matrices (Co depends only on A and B, Ob depends only on A and C) and are logically independent. A system can be controllable and observable, controllable but not observable, observable but not controllable, or neither, all four combinations occur in real systems.

What does it mean if a system is uncontrollable?

It means at least one internal state (or combination of states) cannot be influenced by any choice of input signal, no matter how it is designed. This commonly happens when the input matrix B happens to align with an eigenvector of A, decoupling that mode from the input entirely, a case this calculator can demonstrate directly with the right coefficients.

What does it mean if a system is unobservable?

It means at least one internal state (or combination of states) has no effect on the measured output, so no amount of watching the output over time can reveal what that state is doing. This can happen even in an otherwise well-designed system if the output matrix C simply does not couple to that internal mode.

Why does controllable canonical form guarantee controllability?

Controllable canonical form, used by the sibling State Space Representation Calculator on this site, builds A and B in a fixed structural pattern (B always [[0],[1]], A's top row always [0, 1]) that always produces a nonzero controllability determinant, regardless of the specific numerator or denominator coefficients chosen. This is precisely why the form carries the name it does.

Why do controllability and observability matter for control system design?

Controllability determines whether a state-feedback controller (like pole placement or an LQR) can even be designed at all, since these methods require driving every state to a desired value. Observability determines whether a state estimator (like a Kalman filter or Luenberger observer) can reconstruct the full internal state from the available outputs, essential when not every state can be measured directly.

Does the order of A, B, C matter when checking controllability and observability?

Yes. Controllability depends only on the pair (A, B), the output matrix C plays no role at all in det(Co). Observability depends only on the pair (A, C), the input matrix B plays no role at all in det(Ob). Changing B never affects the observability verdict, and changing C never affects the controllability verdict.