The invisible architecture through which intelligence becomes impact.
Matrix is not a catalogue of algorithms — it is an atlas of intelligences. Seven domains, each a way of thinking, each a lens onto the systems that quietly govern food, water, health, energy, and civic decision-making.
Intelligence
Reasoning, optimization, learning — thirty-plus algorithms rendered as interactive state machines you can step through and interrogate.
Architecture
A single JSON step schema binds every algorithm to every renderer. New intelligences are additive — they never reshape the navigation.
Impact
Each intelligence card links its principle to the real-world systems it already runs — logistics, chip layout, robotics, capital allocation, civic infrastructure.
Seven Intelligence Domains
Foundations
The primitives that turn raw data into a readable substrate — the bedrock every higher intelligence rests on.
Metaphor — A well-cut foundation stone.
Bubble Sort
Adjacent-pair correction until stable.
- Time
- O(n²)
- Space
- O(1)
- Teaching invariants
- Small-N inline sorts
- Sanity checks
Selection Sort
Repeatedly extract the smallest remaining element.
- Time
- O(n²)
- Space
- O(1)
- Memory-constrained sorting
- Minimizing writes to storage
Insertion Sort
Build sorted prefix one element at a time.
- Time
- O(n²)
- Space
- O(1)
- Nearly-sorted data
- Online streaming inserts
- Small partitions inside quicksort
Merge Sort
Split, sort halves, merge in linear time.
- Time
- O(n log n)
- Space
- O(n)
- External sorting of large files
- Stable sorts
- TimSort core
Quick Sort
Partition around a pivot; recurse on sides.
- Time
- O(n log n) avg
- Space
- O(log n)
- General-purpose in-memory sort
- Language stdlibs
- Selection algorithms
Heap Sort
Repeatedly extract max from a binary heap.
- Time
- O(n log n)
- Space
- O(1)
- Guaranteed O(n log n) worst case
- Priority queues
- K-largest problems
Linear Search
Check each element until found.
- Time
- O(n)
- Space
- O(1)
- Unsorted data
- Streaming search
- Baseline benchmark
Binary Search
Repeatedly halve a sorted interval.
- Time
- O(log n)
- Space
- O(1)
- Sorted-array lookup
- Range queries
- Numerical root-finding
Jump Search
Skip ahead by √n then linear-scan the block.
- Time
- O(√n)
- Space
- O(1)
- Sorted arrays on slow storage
- When random access is expensive
BST Insert
Place each key on the side its comparison dictates.
- Time
- O(h)
- Space
- O(h)
- Ordered maps
- Range queries
- In-memory indexing
BST Search
Descend left/right by comparison until match.
- Time
- O(h)
- Space
- O(1)
- Symbol tables
- Interval trees
- Database index probes
In-order Traversal
Visit left, root, right — emits sorted order.
- Time
- O(n)
- Space
- O(h)
- Serializing a BST
- Range enumeration
- Expression-tree evaluation
Reasoning
Deterministic thought — trace exhaustive consequences of rules over structured state.
Metaphor — Light refracting through a prism.
Breadth-First Search
Expand outward by layer — shortest hop-count.
- Time
- O(V+E)
- Space
- O(V)
- Shortest unweighted path
- Web crawlers
- Social-graph radius
Depth-First Search
Follow one branch to exhaustion, backtrack.
- Time
- O(V+E)
- Space
- O(V)
- Cycle detection
- Topological ordering
- Maze solving
Dijkstra's Shortest Path
Greedy relaxation from source over non-negative weights.
- Time
- O((V+E) log V)
- Space
- O(V)
- Road-network routing
- Network packet paths
- Robot motion planning
Prim's MST
Grow a tree by adding the cheapest crossing edge.
- Time
- O(E log V)
- Space
- O(V)
- Utility network design
- Cluster analysis
- Approximation of TSP
Kruskal's MST
Add cheapest edges that don't form a cycle.
- Time
- O(E log E)
- Space
- O(V)
- Sparse-graph MST
- Circuit design
- Image segmentation
Topological Sort (Kahn's)
Emit nodes with no remaining prerequisites first.
- Time
- O(V+E)
- Space
- O(V)
- Build systems
- Task schedulers
- Course prerequisites
Tower of Hanoi
Solve n by first solving n−1 twice.
- Time
- O(2ⁿ)
- Space
- O(n)
- Teaching recursion
- State-space enumeration
- Backup rotation schemes
N-Queens
Place, propagate constraints, undo on conflict.
- Time
- O(N!)
- Space
- O(N)
- Constraint satisfaction
- Scheduling
- Puzzle solvers
Permutations (Backtracking)
Recursively swap-in each unused element.
- Time
- O(n·n!)
- Space
- O(n)
- Test-case generation
- Symmetry breaking
- Brute-force baselines
Fibonacci (DP)
Cache subproblem results to avoid recomputation.
- Time
- O(n)
- Space
- O(n)
- Numerical sequences
- Teaching memoization
- Base-case for DP tutorials
0/1 Knapsack
Decide include/exclude each item to maximize value under weight.
- Time
- O(nW)
- Space
- O(nW)
- Resource allocation
- Budget planning
- Portfolio selection
Longest Common Subsequence
Best matching subsequence via 2D DP table.
- Time
- O(nm)
- Space
- O(nm)
- Diff/merge tools
- DNA sequence alignment
- Plagiarism detection
Coin Change (Min Coins)
Fewest coins to make an amount via DP.
- Time
- O(n·amt)
- Space
- O(amt)
- Currency systems
- Change-making machines
- Resource unit assembly
Optimization
Find the best point in a landscape without checking every point — climb, cool, differ.
Metaphor — A machined lens converging light on a single focal point.
Hill Climbing
Always move to the best neighbor.
- Time
- O(n·k)
- Space
- O(1)
- Hyperparameter refinement
- Layout adjustment
- Local calibration
Simulated Annealing
Accept worse moves with cooling probability.
- Time
- O(iter)
- Space
- O(1)
- Chip layout (place & route)
- Vehicle routing
- Timetabling
Differential Evolution
Mutants formed from population differences.
- Time
- O(g·p)
- Space
- O(p)
- Continuous parameter fitting
- Model calibration
- Engineering design
Learning
Update internal state so that tomorrow's decisions are demonstrably better than today's.
Metaphor — A river carving its bed deeper each pass.
Collective Intelligence
Coordination without a commander — populations, swarms, and colonies converge through local rules.
Metaphor — A murmuration of starlings.
Genetic Algorithm
Selection + crossover + mutation over generations.
- Time
- O(g·p)
- Space
- O(p)
- Antenna design
- Neural-architecture search
- Scheduling
Particle Swarm Optimization
Particles pulled toward personal & global bests.
- Time
- O(iter·p)
- Space
- O(p)
- Continuous optimization
- Training small networks
- Sensor placement
Ant Colony Optimization
Pheromone reinforces good paths; evaporation forgets.
- Time
- O(iter·k)
- Space
- O(n)
- Traveling salesman
- Network routing
- Logistics
Probabilistic Intelligence
Repeated sampling converts intractable questions into stable estimates.
Metaphor — Waves averaging into a shoreline.
Quantum IntelligenceReserved
Algorithms that compute across states in parallel. Placeholder domain for future integration.
Metaphor — A tuning fork holding two notes at once.
Quantum intelligence enters the Atlas once its algorithms can be rendered with the same rigor as the rest of the system — not as a graphic, but as an interactive state machine.