I think you need to calculate 2 other vectors using the one you have. Those 3 vectors need to be orthogonal (just like the xyz axis). The Z vector is the one you already have. The Y vector can be set to 0,1,0 as long as Z is not vertical, and X would then be the cross product of Y and Z. Since the Y axis is completely wrong (because I arbitrarily chose 0,1,0), it needs to be recalculated from X and Z using the cross product.
Now you have the 3 vectors, and can write them in the matrix: each vector is a row (or a column, can't remember

). Don't forget to set the lower right number to 1.
I know it's not that clear, and I'm not even sure that my algorithm is working, but it's probably better than nothing.