Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm solving a problem which features a function $f: \mathbb{R}^4 \rightarrow \mathbb{R}^4.$ I don't know the function, but I assume it's linear and it can be expressed as $ \mathbf{y} = \mathbf{A} \cdot \mathbf{x},\; \mathbf{A} \in \mathbb{R}^{4\times 4},\; \mathbf{x},\mathbf{y} \in \mathbb{R}^{4}$.

I have a lot of data, ie. $ (\mathbf{x}, \mathbf{y}) $ tupples and my first thought was to perform some kind of least-squares fitting in order to obtain the matrix $ \mathbf{A} $. However, I'm not sure if this approach is correct, because I've only seen the least-squares applied to functions $ \mathbb{R}^{n} \rightarrow \mathbb{R} $. If I used least-squares I'd perform the fitting for each of the $f$'s range variables separately, which I doubt is valid.

How to solve this problem correctly?

share|cite|improve this question
Since $y_1$ doesn't depend on the other $y_i$ in you linear model, you should be able to estimate each row of $A$ separately. Since you are minimising the sum of squares in least squares, you are minimising the sum of squares by adding each of the four sum of squares for each element. – Daryl Feb 2 '13 at 11:11
You're right. Thank you for your comment. – Jan Hadáček Feb 2 '13 at 11:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.