Question: use Python Write a function 'lorentz test)' which , expects a 2D matrix as input and . tests whether the matrix represents a Lorentz transformation,

 use Python Write a function 'lorentz test)' which , expects a

use Python

Write a function 'lorentz test)' which , expects a 2D matrix as input and . tests whether the matrix represents a Lorentz transformation, see below . Return the boolean True or False accordingly . The required tests consist of check if matrix is square matrix, o check if the determinant is equal to +1 o Check if AT A = , where A is the test matrix, AT is the transposed test matrix (numpy can transpose it for you) and 10 0 0 0 1 0 0 0 0 1 0 the Minkowski metric in matrix format. . This last test involves checking the result of the matrix multiplication for zeros where they should be and similarly for the +1 and three -1's on the diagonal. Allow for deviations from exact values (0,1,-1) of 1% since floating point numbers often carry errors. If any of the above tests fail no matter in which order, return False, otherwise return True

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!