As I'm currently redeveloping my 3D-Engine in C++ I'm curious how to implement the linear algebra most effective.

I saw in many implementations that the programmers implemented classes for 3D- and for 4D Vectors and 3*3 and 4*4 Matrices. Now I wonder what 3*3 matrices and 4D-Vectors are good for if their usage is always up to the coder, since there is no general usage for them. The coders say that a 4D-Vector would represent a point whenever the 4th Component (w) is 1. Now, what is that information good for? Shouldnt the coder _know_ if the certain vector represents a translation or a point?

How for example is a crossproduct for 4D-Vectors defined? Or a Dot-Product? What do they mean if they're defined?

Now one can argue that the multiplication of a 3D-Vector with a 4*4 Matrix is not defined, but you can handle a 3D-Vector appropriately to do it. If one had to use the crossproduct on a 3D-Vector, convert it to a 4D-Vector to multiply it with a matrix, then what is the sense of it?

A rather implementation related question: Is it faster to use 3 concrete variables as the components of a 3D-Vector or an array of three elements?

Thank you for every insight that can halp me!

Michael