Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Let $v_1 = \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ and $v_2=\begin{bmatrix} 1 \\ -1 \end{bmatrix}$ and let $A= \begin{bmatrix} 3 & 2 \\ -2 & 1 \end{bmatrix}$ be a matrix for $T\colon \Bbb R^2\to \Bbb R^2$ relative to the basis $B = \{v_1, v_2\}$.

From this I found that: $T(v_1) = \begin{bmatrix} 4 \\ -1 \end{bmatrix}$ and $T(v_2) = \begin{bmatrix} 5 \\ -3 \end{bmatrix}$

How would I find a formula for $T\begin{pmatrix} \begin{bmatrix}x_1 \\ x_2\end{bmatrix} \end{pmatrix}$. The answer in my book is $\begin{bmatrix} -x_1-6x_2 \\ 2x_1+5x_2 \end{bmatrix}$

share|improve this question
2  
Welcome! Is your question about math in general or about Mathematica? –  Yves Klett Nov 16 '13 at 20:26

1 Answer 1

up vote 5 down vote accepted

Given vectors $\;v_1, v_2, Tv_1, Tv_2$:

{ v1,  v2} = {{2, -1}, {1, -1}};
{Tv1, Tv2} = {{4, -1}, {5, -3}};

This is a direct way of solving underlying linear system:

With[{ m = Array[a, Dimensions[{v1, Tv1}]]}, 
       m.Subscript @@@ {{x, 1}, {x, 2}} /. 
       Solve[ m.#1 == #2 & @@@ {{v1, Tv1}, {v2, Tv2}}, Join @@ m] // 
       Transpose // TraditionalForm]

enter image description here

Since it might seem to be an overkill, let's provide another simpler way, obvious for those about to pass a linear algebra exam:

Transpose[{Tv1, Tv2}].Inverse @ Transpose @ {v1, v2}.{x, y} // MatrixForm

which can be written in the front-end this way:

enter image description here

where we put {x, y} instead of Subscript @@@ {{x, 1}, {x, 2}}.
These both ways are easily applicable to higher dimensional problems involving appropriate numbers of vectors, such that $\;v_1, \dots, v_n\;$ and $\;Tv_1, \dots, Tv_n$ satisfy:
Det @ { v1, ..., vn} != 0 and Det @ { Tv1, ..., Tvn} != 0

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.