What is the blender matrix layout?

I googled with the post subject and “blender matrix layout” but didn’t find the answer.

Is it like this?

[X Y Z T],
[X Y Z T],
[X Y Z T],
[? ? ? ?]

Or the opposite?

[X X X ?],
[Y Y Y ?],
[Z Z Z ?],
[T T T ?]

And what’s the purpose of those 4 other values (marked with a question mark)?

(I’m asking about the python API matrix layout)