The Ray Tracer Challenge: p. 28

The Ray Tracer Challenge by @jamis: p. 28

It appears to me that on page 28, there is an error. The first column of the features/matrices.feature A*B matrix is:

20

44

40

16

whereas my program computed

8

8

-8

-8

Is this an error or have I gotten something wrong?

https://www.symbolab.com/solver/matrix-multiply-calculator/%5Cbegin%7Bpmatrix%7D1%262%263%264%5C%5C%205%266%267%268%5C%5C%209%268%267%266%5C%5C%205%264%263%262%5Cend%7Bpmatrix%7D%5Ccdot%5Cbegin%7Bpmatrix%7D-2%261%262%263%5C%5C%20-3%262%261%26-1%5C%5C%204%263%266%265%5C%5C%201%262%267%268%5Cend%7Bpmatrix%7D

1 Like

It looks like you might have a typo in your second matrix (“B”). In the second row, the first number is a positive “3”, rather than negative. That should get you the expected answer.

  • Jamis
1 Like

Thank you!