1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

AX=B versus Ax=b

  1. Jan 7, 2009 #1
    Hi all,
    I required some help in a linear algebra problem. I've been told to build a sparse matrix solver which solves AX=B where dim(A) = n *n , dim(X) = n*nrhs and hence dim(B) = n*nrhs. This I have to implement on a GPU (I know this is offbeat but needed the math help :) I have an implementation which solved Ax=b wherein dim(A) = n*n and x is a vector i.e. dim(x) = n*1. This is solved using a preconditioned Conjugate Gradient algorithm. (If really interested could read this - http://alice.loria.fr/publications/papers/2008/CNC/Buatois_et_al_CNC.pdf ). I would like to know how I can map the AX=B problem to Ax=b problem (if possible)?

    Vandhan Ramesh
  2. jcsd
  3. Jan 7, 2009 #2
    Hi Vandhan,

    If X = [x_1 x_2 ... x_{nrhs}] where x_i's are the columns (which are nx1 vectors), and similarly B = [b_1 b_2 ... b_{nrhs}], then we can write AX = B as A[x_1 x_2 ... x_{nrhs}] = [b_1 b_2 ... b_{nrhs}], i.e., [Ax_1 Ax_2 ... Ax_{nrhs}] = [b_1 b_2 ... b_{nrhs}]. In this way the matrix*matrix=matrix equation becomes a system of matrix*vector=vector equations.
  4. Jan 10, 2009 #3
    Thanks a lot. So now if I have a data of AX=B, i.e. B's dataset of dimension N * NRHS, all I need to do is solve NRHS times Ax=b, right?

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: AX=B versus Ax=b
  1. Simple Ax = B (Replies: 8)

  2. Understanding Ax=b (Replies: 1)