2

I'm trying to set up a change of basis matrix from the base V -> W with the RowReduce function that's built into Mathematica. I am then supposed to verify the result by taking the product of the change of basis matrix and multiplying it with the co-ordinate vector for x. You can see the Bases and the vector x below.

So, my question is, how do I setup the change of basis matrix and then verify it, with just the RowReduce function? Thanks in advance.

V = {{1, 3}, {4, 6}}
W = {{4, 6}, {2, 5}} 

x = {6, 6}
J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
jhndoe2
  • 83
  • 1
  • 8

1 Answers1

5

This might give you an idea... I merge V and W into one matrix with ArrayFlatten and apply Gaussian elimination by RowReduce.

V = {{1, 3}, {4, 6}};
W = {{4, 6}, {2, 5}};
B = RowReduce[ArrayFlatten[{{V, W}}]][[All, 3 ;;]]
V.B == W

{{-3, -(7/2)}, {7/3, 19/6}}

True

Henrik Schumacher
  • 106,770
  • 7
  • 179
  • 309
  • Ah, smart. Wasn't thinking about how you could compare the two functions that easily. Just one question though. What does the ArrayFlatten, and the [[All, 3 ;;]] commands mean? Thank you very much for your answer. – jhndoe2 Dec 27 '18 at 13:34
  • ArrayFlatten can merge block matrices to a single matrix. And A[[All, 3 ;;]] reads off the columns 3 to Dimensions[A][[2]] of a matrix A. See the documentation of Part and Span for details. – Henrik Schumacher Dec 27 '18 at 13:36
  • Ah, now I get it. Thank you so much. If i were to calculate the change of basis matrix from W -> V, using the Inverse function, would I first take the inverse of W, and then multiply W^1 * V? – jhndoe2 Dec 27 '18 at 13:51
  • You're welcome. I'd rather use V.Inverse[W] or W.Inverse[V] depending on which direction you would like to have. – Henrik Schumacher Dec 27 '18 at 14:04
  • Well, I'd like to know the change of basis matrix from the base W -> V, so how would the function look like? – jhndoe2 Dec 27 '18 at 14:16
  • Hmm. It is not entirely clear to me what you look for. If you are looking for a matrix A such that A.W == V, then A = V.Inverse[W] is what you want (just multiply the equation with Inverse[W] from the right). If you seek B such that B.V == W, then B = W.Inverse[V]. – Henrik Schumacher Dec 27 '18 at 15:08
  • Okay, I'll try to be more clear. English is not my primarylanguage so forgive me for any misunderstandings. First, with your help, I decided the change of basis matrix from the bases V -> W, and after that I verified it so that it'd be correct. Now, I'm trying to decide the change of basis matrix from W -> V instead. – jhndoe2 Dec 27 '18 at 15:40
  • The basis change matrix W -> V should be the inverse of the basis change matrix V -> W. – Henrik Schumacher Dec 27 '18 at 15:54