TL;DR: You need to use the inverse of the transformation matrix in your question.

You’ve made a fairly common error here. The transformation matrix that you’ve shown maps the old coordinate axes onto the new ones. However, to get the coordinates of a point relative to these new axes, you have to invert that transformation. Why this is so is covered elsewhere on this SE and on the Internet, but I’ll briefly explain why here.

Let and be the positive unit direction vectors of an arbitrary pair of coordinate axes, and the origin point of this coordinate system. We can express any point as ; the coefficients and are the coordinates of this point in this coordinate system. The - and - coordinates in the standard coordinate system can be understood in the same way by taking and , so that we have . We can write and , and if we express as coordinates in the standard coordinate system, we get the following identity: Using homogeneous coordinates, we can express this identity in matrix form as $$\begin{bmatrix}x\\y\\1\end{bmatrix} = \begin{bmatrix}a&c&O_x\\b&d&O_y\\0&0&1\end{bmatrix} \begin{bmatrix}u\\v\\1\end{bmatrix}.$$ Note that the matrix in this identity maps the standard unit coordinate vectors onto the new ones and sends the origin to . We want to solve this equation for and , which we can do by multiplying both sides by the inverse of the matrix.

In your case, gets sent to , gets sent to , and the origin gets sent to . The correct matrix for computing the new coordinates of a point is therefore More generally, if the new coordinate axes are obtained by rotating and translating the old ones, the coordinate transformation matrix will be Here I used the fact that the inverse of a rotation matrix is its transpose.

Answer from amd on Stack Exchange
🌐
Wolfram MathWorld
mathworld.wolfram.com › ChangeofCoordinatesMatrix.html
Change of Coordinates Matrix -- from Wolfram MathWorld
February 1, 2017 - A change of coordinates matrix, also called a transition matrix, specifies the transformation from one vector basis to another under a change of basis. For example, if B={u,v} and B^'={u^',v^'} are two vector bases in R^2, and let [r]_B be the coordinates of a vector r in R^2 in basis B and [r]_(B^') its coordinates in basis B^'. Write the basis vectors u^' and v^' for B^' in coordinates relative to basis B as [u^']_B = [a; b] (1) [v^']_B = [c; d]. (2) This means that u^' = au+bv (3) v^'...
🌐
123Calculus
123calculus.com › en › matrix-transformation-page-1-35-200.html
Matrix transformation Calculator
Calculates matrix transformation like rotation, reflection, projection, shear (transvection) or stretch.
People also ask

How do I use the matrix transformation calculator?
Enter a list of 3D points, select the desired transformations (e.g., translation, rotation, scaling), and specify the transformation parameters. The tool will compute the final 4×4 transformation matrix and apply it to your points.
🌐
procalclab.com
procalclab.com › home › matrix transformation calculator
Matrix Transformation Calculator
How are the transformations applied?
Transformations are applied in the order you specify. The final transformation matrix is the product of the individual transformation matrices, applied from right to left.
🌐
procalclab.com
procalclab.com › home › matrix transformation calculator
Matrix Transformation Calculator
What transformations can I apply?
You can apply translation, rotation (around the X, Y, or Z axes), scaling, and custom rotations around an arbitrary axis.
🌐
procalclab.com
procalclab.com › home › matrix transformation calculator
Matrix Transformation Calculator
🌐
Pro Calculators Lab
procalclab.com › home › matrix transformation calculator
Matrix Transformation Calculator
September 27, 2025 - Interactive tool to build a single 4×4 transform matrix from translation rotation and scale then apply it to 3D points for conversion between local and global coordinates.
🌐
eMathHelp
emathhelp.net › calculators › linear-algebra › transition-matrix-calculator
Transition Matrix Calculator - eMathHelp
The calculator will find the transition matrix from the first basis to the second basis, with steps shown.
🌐
DCode
dcode.fr › mathematics › matrix › transition matrix
Transition Matrix Calculator - Online Change of Basis Coordinates
Tool for calculating a transition matrix (change of basis) based on a homothety or rotation in a vector space and coordinate change calculations.
🌐
Stack Exchange
math.stackexchange.com › questions › 4254295 › calculation-of-coordinate-transformation
matrices - Calculation of coordinate transformation - Mathematics Stack Exchange
September 19, 2021 - A coordinate transformation of the following matrix is to be carried out: $$\mathbf \epsilon= \left[ \begin {array}{ccc} \epsilon_{11}&0&0\\ 0& \epsilon_{22}&0\\ 0&0&\epsilon_{22}\end {array} \right] $$ This should be done with the following formula (tensor rank-2): $$\mathbf\epsilon'=\mathbf Q \mathbf \epsilon \mathbf Q^T$$
Top answer
1 of 2
1

TL;DR: You need to use the inverse of the transformation matrix in your question.

You’ve made a fairly common error here. The transformation matrix that you’ve shown maps the old coordinate axes onto the new ones. However, to get the coordinates of a point relative to these new axes, you have to invert that transformation. Why this is so is covered elsewhere on this SE and on the Internet, but I’ll briefly explain why here.

Let and be the positive unit direction vectors of an arbitrary pair of coordinate axes, and the origin point of this coordinate system. We can express any point as ; the coefficients and are the coordinates of this point in this coordinate system. The - and - coordinates in the standard coordinate system can be understood in the same way by taking and , so that we have . We can write and , and if we express as coordinates in the standard coordinate system, we get the following identity: Using homogeneous coordinates, we can express this identity in matrix form as $$\begin{bmatrix}x\\y\\1\end{bmatrix} = \begin{bmatrix}a&c&O_x\\b&d&O_y\\0&0&1\end{bmatrix} \begin{bmatrix}u\\v\\1\end{bmatrix}.$$ Note that the matrix in this identity maps the standard unit coordinate vectors onto the new ones and sends the origin to . We want to solve this equation for and , which we can do by multiplying both sides by the inverse of the matrix.

In your case, gets sent to , gets sent to , and the origin gets sent to . The correct matrix for computing the new coordinates of a point is therefore More generally, if the new coordinate axes are obtained by rotating and translating the old ones, the coordinate transformation matrix will be Here I used the fact that the inverse of a rotation matrix is its transpose.

2 of 2
1

I can't really comment due to reputation but, can you please include the details: what exactly you're trying to do and include a grid of reference to denote the transformation you're trying to achieve(or atleast the position of origin) and label the vertices of the image in the rectangle. I'll try to help you further then. e.g. an explanation like rotating the rectangle and translating via xyz.

Find elsewhere
🌐
Shelvean
shelvean.github.io › math-tools › changebasis.html
Change of Coordinates Matrix Calculator
Given two bases $\mathcal{V} = \{v_1, \ldots, v_n\}$ and $\mathcal{U} = \{u_1, \ldots, u_n\}$ for $\mathbb{R}^n$, this calculator computes the change of coordinates matrix $\mathbf{S}$ that converts coordinates from basis $\mathcal{V}$ to basis $\mathcal{U}$. Want to see how change of basis works geometrically? Try the Coordinate Transform Visualizer for an interactive animated demonstration.
🌐
Stack Overflow
stackoverflow.com › questions › 23986263 › how-to-calculate-the-transformation-matrix-of-3d-coordinate-system
How to calculate the transformation matrix of 3D coordinate system? - Stack Overflow
8 Numpy - Transformations between coordinate systems · 5 Change from one cartesian 3D co-ordinate system to another by translation and rotation · 4 3D Tranformation matrix between two coordinate systems matlab
🌐
Wolfram|Alpha
wolframalpha.com › examples › mathematics › geometry › geometric-transformations
Wolfram|Alpha Examples: Geometric Transformations
Calculations and graphs for geometric transformations. Visualize and compute matrices for rotations, Euler angles, reflections and shears.
🌐
Unblink3d
unblink3d.com › r3vtdocs2023 › 03.html
3. Transformation Calculator — Unblink3D Robotics 3D Vision Toolbox documentation
The transformation from the source ... target coordinate frame (measurement) ... Best-Fit by axis is a numerical algorithm that is iterated until it converges. It is often used when CAD puts a higher tolerance on certain axis, so the user wants to exclude them and select only the most critical features to compute the alignment. It tries to compute a transformation matrix \(T\) such ...
🌐
I Do Maths
idomaths.com › linear_transformation.php
I Do Maths · Geometric Linear Transformation (2D)
Linear Transformation (Geometric transformation) calculator in 2D, including, rotation, reflection, shearing, projection, scaling (dilation).
🌐
Omni Calculator
omnicalculator.com › math › rotation
Rotation Calculator
March 17, 2025 - Our rotation calculator implements this basic geometric transformation for up to ten points at the same time!
🌐
Matrix Calculator
matrixcalc.org
Matrix calculator
Matrix addition, multiplication, inversion, determinant and rank calculation, transposing, bringing to diagonal, row echelon form, exponentiation, LU Decomposition, QR-decomposition, Singular Value Decomposition (SVD), solving of systems of linear equations with solution steps
🌐
Sage Calculator
sagecalculator.com › matrix-transformation-calculator
Matrix Transformation Calculator - Sage Calculator
June 19, 2025 - When you choose a transformation, the calculator dynamically generates the corresponding matrix based on your input values. Then it applies the matrix to the point (x, y) using: CopyEditx′ = m11 * x + m12 * y y′ = m21 * x + m22 * y · Where m11, m12, m21, m22 are matrix entries based on the transformation type. ... Provide the coordinates of the point to transform (X and Y).
🌐
Texas A&M University
people.tamu.edu › ~kapita › changebasis.html
Change of Coordinates Matrix Calculator
This interactive mathematical tool has permanently moved to my GitHub site and you will be redirected automatically in 2 seconds · Click here to access the tool immediately on GitHub
🌐
Master PDF Editor
code-industry.net › masterpdfeditor-help › transformation-matrix
Transfomation Matrix
Transormation matrix is used to calculate new coordinates of transformed object. By changing values of transformation matrix, it is possible to apply any transformations to objects (scaling, mirroring, rotating, moving etc).
🌐
Appspot
dominoc925-pages.appspot.com › webapp › calc_transf3d › default.html
dominoc925 - 4x4 Rigid 3D Transformation between points Calculator
This tool will calculate the optimal 4x4 rigid transformation matrix between two sets of matching 3D data points and the corresponding root mean square error (rmse). The resultant 4x4 transformation matrix can be applied to the original or source 3D data points to align with the destination coordinate system.
🌐
Math for Engineers
mathforengineers.com › math-calculators › 3D-point-rotation-calculator.html
3D Point Rotation Calculator
The coordinates \( (x,y,z) \) of point P rotated by an angle \( \theta_z \) around the y-axis, in counterclockwise direction, are transformed to the coordinates \( (x',y',z') \) given by: \[ \begin{bmatrix} x'\\ y'\\ z'\\ \end{bmatrix} = R_z(\theta_z) \begin{bmatrix} x\\ y\\ z\\ \end{bmatrix} \] where \( R_z(\theta_z) = \begin{bmatrix} \cos\theta_z & -\sin\theta_z & 0 \\ \sin\theta_z & \cos\theta_z & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} \)