For instance to move an object using the keyboard by a set vector distance:
//Get Keyboard Input
if(GetAsyncKeyState(VK_RIGHT))
object_matrix = MatrixMult(CreateTranslationMatrix(D3DVECTOR(-STEP,0.0,0.0)),object_matrix);
if(GetAsyncKeyState(VK_LEFT))
object_matrix = MatrixMult(CreateTranslationMatrix(D3DVECTOR(STEP,0.0,0.0)),object_matrix);
if(GetAsyncKeyState(VK_UP))
object_matrix = MatrixMult(CreateTranslationMatrix(D3DVECTOR(0.0,0.0,-STEP)),object_matrix);
if(GetAsyncKeyState(VK_DOWN))
object_matrix = MatrixMult(CreateTranslationMatrix(D3DVECTOR(0.0,0.0,STEP)),object_matrix);
The above code uses two functions:
MatrixMult - multiplys the two matrices together and returns the result.
CreateTranslationMatrix - creates a translation (position) matrix based on the given vector.
The above code would be a hell of a lot faster if flags were set if keys are pressed and then only call the matrixmult/createtranslationmatrix functions once with the final vector.
Also keep in mind that matrix multiplication is not commutative(sp?). It means that the order in which the multiplication takes place matters.
M1*M2 != M2*M1
This makes sense because if you turn right and take ten steps you will be in a different place than if you had taken 10 steps then turned right.
So basically you need to understand a little linear algebra. Also, Depending on if you are in a left or right hand coordinate system the construction of the matrix is a little different.
There is some matrix information in the Direct3D documentation or if you are using OpenGL take a look at chapter three in the Red Book [http://fly.cc.fer.hr/~unreal/theredbook/]
Good Luck
Oh yeah, If you have the DirectX SDK then do a search for 'D3DMath' it has all the functions you would need.