Question: Matrix-related questions

I had a few questions that I need help with: 1) I'm trying to write a procedure to solve a system of equations. To be specific, we are given 2 n x n matrices, say A and B by the user. We have two generic vectors in R^n, write them as x = [x1, x2, ..., xn] and y = [y1, y2, .., yn]. I want to solve for each of the yi's in terms of x'js for the equation A.x = B.y - how would I go about doing this? 2) So I get some answer to 1), say something like y = [x1-x3, x1+x2-x4, x1+x2, x3+x4] (n=4 for ease) . How could I easily take the coefficient matrix of the transpose of this vector? So, my final matrix would look like: [1 1 1 0] [0 1 1 0] [-1 0 0 1] [0 -1 0 1] I suppose the transpose thing isn't really that difficult, just the part about coefficients. 3) Given an n x n matrix A, how could I find the signature of A, that is, the number of positive eigenvalues minus the number of negative eigenvalues of A? Thanks in advance!
Please Wait...