Help solving an equation for 3d modeling

  • Thread starter Thread starter edward5elric
  • Start date Start date
  • Tags Tags
    3d Modeling
edward5elric
Messages
2
Reaction score
0
This is my first post and I'm pretty much lost when it comes to linear algebra. I am a programmer and I am currently working on converting a 3D model format for personal purposes. I am having trouble figuring out an equation. If you want the background of what I am doing I'll be happy to explain but it really isn't necessary to solve my problem.

Lets say that I have two matrices (4x4) M1 and M2. One vector4 v. I transform v by M1 to get v1 and v by M2 to get v2. So...

M1 * v = v1
M2 * v = v2

I am looking for some matrix X.

X * v1 = v2, solve for X.

What I came up with is X = (M2 * v) / (M1 * v), cross out v and get X = M2 / M1 or X = M2 * M1_inverse.

This does not produce the result I am looking for. Any suggestions? Thank you for any help.
 
Physics news on Phys.org
X = M2*M1^-1 is correct, so it would seem your implementation is wrong somehow?
 
Thanks. I probably made a programming error.
 
I take it the problem isn't anything so obvious as M1 being not always invertible?
 
edward5elric said:
Thanks. I probably made a programming error.

I'd start by checking that the inverse is actually the inverse, ie multiply by M1 and see you get (almost) the identity matrix. Next I'd check that I got the order of the multiplication right for the matrix multiplication routine I'm using (ie perhaps you should call it with (M1inv, M2) and not the "natural" way).

As a side note, a slightly less "hairy" way to get to the answer is this:

M1 * v = v1 ==> M1^-1 * M1 * v = M1^-1 * v1 ==> v = M1^-1 * v1

M2 * v = v2 ==> M2 * (M1^-1 * v1) = v2 ==> (M2 * M1^-1) * v1 = v2
 
I agree with Lorc Crc - I wouldn't do any "crossing out" in linear algebra - or even division for that matter - always move things around with the inverse operation.

Dave
 
##\textbf{Exercise 10}:## I came across the following solution online: Questions: 1. When the author states in "that ring (not sure if he is referring to ##R## or ##R/\mathfrak{p}##, but I am guessing the later) ##x_n x_{n+1}=0## for all odd $n$ and ##x_{n+1}## is invertible, so that ##x_n=0##" 2. How does ##x_nx_{n+1}=0## implies that ##x_{n+1}## is invertible and ##x_n=0##. I mean if the quotient ring ##R/\mathfrak{p}## is an integral domain, and ##x_{n+1}## is invertible then...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...
When decomposing a representation ##\rho## of a finite group ##G## into irreducible representations, we can find the number of times the representation contains a particular irrep ##\rho_0## through the character inner product $$ \langle \chi, \chi_0\rangle = \frac{1}{|G|} \sum_{g\in G} \chi(g) \chi_0(g)^*$$ where ##\chi## and ##\chi_0## are the characters of ##\rho## and ##\rho_0##, respectively. Since all group elements in the same conjugacy class have the same characters, this may be...
Back
Top