# Silly Matrix Algebra/Regression Question

1. Jun 25, 2010

### Weather Freak

So I have what I think is going to be a silly matrix algebra question.

I'm performing a linear regression, using standard matrix algebra:

Y = XA (all are matrices)

I have found my coefficients (A) and now I wish to use that information to get X as a function of Y.

If this were a normal algebraic equation, I'd have X = Y/A, but that doesn't make sense in matrix-land.

I've tried: Y * A' * inv(A * A') = X, but that doesn't give me numbers which make any sense.

Can anyone help me clear this up? I'm sure it's not too difficult... thanks!!

EDIT: I suppose it might be useful to give some matrix dimensions, but I think the algebra should be the same no matter what... A = (10x144), X = (1x10), Y = (1x144)

2. Jun 26, 2010

### jasonRF

The approach you are taking (so-called "normal equations") will often work, although in general it isn't good from a numerics perspective, expecially for a large number of unknowns. I think we need more details in order to help.

How do you know that the results make no sense?

What exactly are your basis functions (powers, othogonal polynomials, or ...)? In other words, what does A look like, and what is the condition of A*A' ? It could be that A*A' is poorly conditioned.

Also, how are you doing the numerics? Did you write you own software or are you using some well established library/application? single precision or double?

jason

3. Jun 29, 2010

### trambolin

If you take the transpose of the equation, you are left with a linear equation $A^Tx^T = y^T$which can be solved in numerous ways. Your suggestion is one of them.