Nonnegativity Problems for Matrix Semigroups

Authors Julian D'Costa , Joël Ouaknine , James Worrell

Thumbnail PDF


  • Filesize: 0.77 MB
  • 16 pages

Document Identifiers

Author Details

Julian D'Costa
  • Department of Computer Science, University of Oxford, UK
Joël Ouaknine
  • Max Planck Institute for Software Systems, Saarland Informatics Campus, Saarbrücken, Germany
James Worrell
  • Department of Computer Science, University of Oxford, UK

Cite AsGet BibTex

Julian D'Costa, Joël Ouaknine, and James Worrell. Nonnegativity Problems for Matrix Semigroups. In 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 289, pp. 27:1-27:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


The matrix semigroup membership problem asks, given square matrices M,M₁,…,M_k of the same dimension, whether M lies in the semigroup generated by M₁,…,M_k. It is classical that this problem is undecidable in general, but decidable in case M₁,…,M_k commute. In this paper we consider the problem of whether, given M₁,…,M_k, the semigroup generated by M₁,…,M_k contains a non-negative matrix. We show that in case M₁,…,M_k commute, this problem is decidable subject to Schanuel’s Conjecture. We show also that the problem is undecidable if the commutativity assumption is dropped. A key lemma in our decidability proof is a procedure to determine, given a matrix M, whether the sequence of matrices (Mⁿ)_{n = 0}^∞ is ultimately nonnegative. This answers a problem posed by S. Akshay [S. Akshay et al., 2022]. The latter result is in stark contrast to the notorious fact that it is not known how to determine, for any specific matrix index (i,j), whether the sequence (Mⁿ)_{i,j} is ultimately nonnegative. Indeed the latter is equivalent to the Ultimate Positivity Problem for linear recurrence sequences, a longstanding open problem.

Subject Classification

ACM Subject Classification
  • Computing methodologies → Symbolic and algebraic manipulation
  • Theory of computation → Formal languages and automata theory
  • Decidability
  • Linear Recurrence Sequences
  • Schanuel’s Conjecture


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. S. Akshay, S. Chakraborty, and D. Pal. On eventual non-negativity and positivity for the weighted sum of powers of matrices. In Automated Reasoning - 11th International Joint Conference, IJCAR, 2022. URL:
  2. L. Babai, R. Beals, J.-Y. Cai, G. Ivanyos, and E. M. Luks. Multiplicative equations over commuting matrices. In Proceedings of the Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, pages 498-507, 1996. Google Scholar
  3. P. Bell, M. Hirvensalo, and I. Potapov. The identity problem for matrix semigroups in SL(2,ℤ) is NP-complete. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, 2017. Google Scholar
  4. J. Berstel. Sur les pôles et le quotient de hadamard de séries n-rationnelles. C. R. Acad. Sci. Paris Sér. A-B, 272:A1079-A1081, 1971. Google Scholar
  5. Jean Berstel and Christophe Reutenauer. Noncommutative rational series with applications. Cambridge University Press, 2011. Google Scholar
  6. J.-Y. Cai. Computing Jordan normal forms exactly for commuting matrices in polynomial time. Int. J. Found. Comput. Sci., 5(3/4):293-302, 1994. URL:
  7. T. Colcombet, J. Ouaknine, P. Semukhin, and J. Worrell. On Reachability Problems for Low-Dimensional Matrix Semigroups. In 46th International Colloquium on Automata, Languages, and Programming (ICALP), volume 132 of Leibniz International Proceedings in Informatics (LIPIcs), pages 44:1-44:15, 2019. Google Scholar
  8. George Dantzig. Linear programming and extensions. Princeton University Press, 1963. Google Scholar
  9. R. Dong. On the identity problem for unitriangular matrices of dimension four. In 47th International Symposium on Mathematical Foundations of Computer Science, MFCS, volume 241 of LIPIcs, pages 43:1-43:14, 2022. Google Scholar
  10. R. Dong. The Identity Problem in ℤ ≀ ℤ Is Decidable. In 50th International Colloquium on Automata, Languages, and Programming (ICALP), volume 261 of Leibniz International Proceedings in Informatics (LIPIcs), pages 124:1-124:20, 2023. Google Scholar
  11. N. Fijalkow. Undecidability results for probabilistic automata. ACM SIGLOG News, 4(4):10-17, 2017. Google Scholar
  12. S.-K. Ko, R. Niskanen, and I. Potapov. On the identity problem for the special linear group and the Heisenberg group. In 45th International Colloquium on Automata, Languages, and Programming, ICALP, pages 132:1-132:15, 2018. Google Scholar
  13. S. Lang. Introduction to transcendental numbers. Addison-Wesley Series in Mathematics. Reading, Mass. etc.: Addison-Wesley Publishing Company. VI, 105 p. (1966)., 1966. Google Scholar
  14. Angus Macintyre and Alex J. Wilkie. On the decidability of the real exponential field. In Piergiorgio Odifreddi, editor, Kreiseliana. About and Around Georg Kreisel, pages 441-467. A K Peters, 1996. Google Scholar
  15. A. Markov. On certain insoluble problems concerning matrices. Doklady Akad. Nauk SSSR, 57(6):539-542, June 1947. Google Scholar
  16. D. W. Masser. Linear relations on algebraic groups. In New Advances in Transcendence Theory. Camb. Univ. Press, 1988. Google Scholar
  17. Carl D. Meyer. Matrix analysis and applied linear algebra. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, second edition, 2023. Google Scholar
  18. D. Noutsos. On perron-frobenius property of matrices having some negative entries. Linear Algebra and its Applications, 412(2-3):132-153, 2006. Google Scholar
  19. J. Ouaknine, A. Pouly, J. Sousa-Pinto, and J. Worrell. Solvability of matrix-exponential equations. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science, pages 798-806, 2016. Google Scholar
  20. J. Ouaknine and J. Worrell. Positivity problems for low-order linear recurrence sequences. In Proceedings of SODA'14. ACM-SIAM, 2014. URL:
  21. M. S. Paterson. Undecidability in 3 by 3 matrices. J. of Math. and Physics, 1970. Google Scholar
  22. D. Richardson. How to recognize zero. Journal of Symbolic Computation, 24(6):627-645, 1997. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail