# How would complex coefficients affect an algorithm to solve system of linear equations?

I was testing a program that solves system of linear equations. The program allows the user to enter the coefficients of each equation. When I entered the complex number $i$ as on of the coefficients, the system produced a warning indicating that the implemented algorithm does not work with complex numbers.

Aside from programming specifics, my question is:

Do methods of solving linear equations such as Row Reduction, Cramer's Rules and Multiplication by matrix inverse restricted to real numbers only? Thank you all kindly.

• @hardmath, thx. Oct 18, 2015 at 16:20

The methods you mention work over all fields (that is the power gained by abstraction in linear algebra) with the same pseudo-code. If you think about it from an "object oriented" point of view, the axiom of a field provide an interface for an object $\mathbb{F}$ that comes with two binary operations $(+,\cdot)$ whose implementation must satisfy various properties (the field axioms). In this sense, you can implement an algorithm that will work for matrices over all fields (and won't require modification for different fields). However, the programmer must provide support for field arithmetic for each field separately.