## How to solve Ax=B complex matrix system in F 77

## How to solve Ax=B complex matrix system in F 77

(OP)

Hi all

i want to solve a complex linear algebra equation in the form of

Ax = B. ( A, B are known and need to find B)

where A and B are complex.. A(n,n) & B (n,1) & x (n,1)

i want this to be solved using Fortran 77.

I've used Linpack solvers to solve Ax=B , when A,B,x all are real values

call solver (A,B,NETOT,1,z)

solver contains Linpack subroutines

but the same code does not work when A,B are complex matrices

i want to solve a complex linear algebra equation in the form of

Ax = B. ( A, B are known and need to find B)

where A and B are complex.. A(n,n) & B (n,1) & x (n,1)

i want this to be solved using Fortran 77.

I've used Linpack solvers to solve Ax=B , when A,B,x all are real values

call solver (A,B,NETOT,1,z)

solver contains Linpack subroutines

but the same code does not work when A,B are complex matrices

## RE: How to solve Ax=B complex matrix system in F 77

This page http://www.netlib.org/linpack/ has some functions listed there...

## RE: How to solve Ax=B complex matrix system in F 77

If x is real, then all you need to fill in is the real part of the complex number into A and B and check it with the imaginary part of A and B. If the imaginary part doesn't match then there is no solution. It is a different problem if x is complex.

## RE: How to solve Ax=B complex matrix system in F 77

in my problem of Ax = B , all i know is i ve got A and B matrices like given from previous calculations.

in A matrix some values are having only real parts and others are having both real and imaginary parts.

in B matrix all the values are imaginary values (it is a column matrix actually)

x matrix is THE one i need as solution , and it is unknown.

## RE: How to solve Ax=B complex matrix system in F 77

there are different ways to solve the linear system Ax = b. From your first post you I see that x and b are vectors and A is symmetric. You get x by inverting the coefficient matrix A -> x = A^-1 b.

Inversion of A can be done by an iterative method like preconditioned conjugated gradients, quasi minimal residual or directly by a LU decomposition. If you have the intel compiler you can use the mkl library that comes with the compiler, there are linear system solvers included.