Apply Transformation Matrix to Existing Mesh How can I apply a 3x3 or 4x4 transformation matrix to a mesh such that the matrix's transformation is baked into its geometry?

E.g. applying the following matrix...

\begin{bmatrix}
    1 &amp; 0 &amp; 0 &amp; 0\\
    0 &amp; 0.707 &amp; 0.707 &amp; 0\\
    0 &amp; -0.707 &amp; 0.707 &amp; 0\\
    1 &amp; 0 &amp; 0 &amp; 1\\
\end{bmatrix}
...to the cube primitive should yield the result below, only by changing the mesh's vertices.

Thus the object-level transformation depicted in the properties panel will remain unchanged.
Mesh.transform

import bpy
from mathutils import Matrix

ob = bpy.context.object
me = ob.data

M = Matrix(((1, 0, 0, 0),
     (0, 0.707, 0.707, 0),
     (0, -0.707, 0.707, 0),
     (1, 0, 0, 1)))

me.transform(M)
me.update()