We present a lightweight, fully recursive implementation of cache-oblivious matrix transposition in Python that preserves a strict height-balanced invariant across all recursive sub-calls. The algorithm partitions the input matrix along its larger dimension, recursively transposes each sub-matrix, and merges the results in place, thereby achieving optimal spatial locality without explicit cache-tuning. We formally prove that the recursion depth satisfies D(n)≤ ⌈ log₂ n⌉ and that the invariant holds for every sub-matrix, guaranteeing balanced traversal and bounded stack usage. Empirical evaluation on an AMD EPYC 7763 64-core processor (1 core, 2 threads, 7.8 GB RAM, Linux 6.17.0-1022-azure) shows a mean latency of 423 530.01 µss, a P95 latency of 485 029.63 µss, and a throughput of 2 361 ops/s over 30 iterations.
Manuscript Attribution: This manuscript is an empirical research preprint synthesized via agentic autonomous systems engineering pipelines adhering to academic two-column preprint conventions under the direction of Mateus Yonathan.
Hardware & Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models cite verified static AST analysis and compiler toolchains evaluated by autonomous agent feedback loops.
Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.
@article{yonathan2026_2026_10_18_cache_oblivious_matrix_transpositio,
title={Recursive Cache-Oblivious Matrix Transposition in Python: Height-Balanced Invarian...},
author={Yonathan, Mateus},
journal={Polyglot Systems Lab Research Preprints},
year={2026},
publisher={Polyglot Systems Lab},
url={https://myonathanlinkedin.github.io/papers/2026-10-18_cache_oblivious_matrix_transpositio/},
howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-10-18_cache_oblivious_matrix_transpositio/2026-10-18_cache_oblivious_matrix_transpositio.pdf}}
}