# Relflection Matrix help

Wonder if anyone can help a linear algebra noob get a reflection matrix working for arbitrary planes.  I'm defining planes using the Plane object and built a makeReflection() method (which doesn't seem to be working right).  Then I need to decompose this matrix down for the rotation, scale and translation of the spatial.  I can't seem to get it working.

If anyone can see the error of my ways a pointer would be much appreciated.  Thanks in advance.

```    ...         Plane plane = new Plane(new Vector3f(1.0f, 0.0f, 0.0f),0.0f);         Matrix4f matrix = new Matrix4f();                 makeReflection(matrix,plane);         spatial.setLocalTranslation(matrix.toTranslationVector());         spatial.setLocalRotation(matrix.toRotationMatrix());         //Do I need to worry about scale?    ...    private void makeReflection(Matrix4f matrix, Plane plane)    {         // Need a point on the plane         Vector3f point = plane.getNormal().mult(plane.getConstant());         float twoDP = 2.0f * (plane.getNormal().dot(point));         matrix.m00 = 1.0f - (2.0f * plane.getNormal().x * plane.getNormal().x);         matrix.m01 = -2.0f * plane.getNormal().x * plane.getNormal().y;         matrix.m02 = -2.0f * plane.getNormal().x * plane.getNormal().z;         matrix.m03 = twoDP * plane.getNormal().x;         matrix.m10 = -2.0f * plane.getNormal().y * plane.getNormal().x;         matrix.m11 = 1.0f - (2.0f * plane.getNormal().y * plane.getNormal().y);         matrix.m12 = -2.0f * plane.getNormal().y * plane.getNormal().z;         matrix.m13 = twoDP * plane.getNormal().y;         matrix.m20 = -2.0f * plane.getNormal().z * plane.getNormal().x;         matrix.m21 = -2.0f * plane.getNormal().z * plane.getNormal().y;         matrix.m22 = 1.0f - (2.0f * plane.getNormal().z * plane.getNormal().z);         matrix.m23 = twoDP * plane.getNormal().z;         matrix.m30 = 0.0f;         matrix.m31 = 0.0f;         matrix.m32 = 0.0f;         matrix.m33 = 1.0f;     } ```