I found the inverse and the transpose of a matrix. Now i want to check whether the matrix is orthogonal. The idea i used is to subtract the transpose and the inverse to get 0, but i found that the deference with some elements is 2.22 E-16. Although it is very small but i need to know why i don't get the exact 0.
I need help.
This is called machine precision. Some floating point (or decimal) numbers can only be represented to within + or minus a small value epsilon, they cannot be represented exactly by a binary computer; and so this carries through the mathematical operations. Your result is essentially zero in the world of computers.
This is called machine precision. Some floating point (or decimal) numbers can only be represented to within + or minus a small value epsilon, they cannot be represented exactly by a binary computer; and so this carries through the mathematical operations. Your result is essentially zero in the world of computers.
@PaigeMiller is correct. The thing I would add is look at the proc compare documentation for various ways to compare computed numbers. Expecting differences to be zero for nontrivial (or ever some fairly trivial) computations is unrealistic. Also check out: https://documentation.sas.com/?docsetId=lrcon&docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&docsetVe...
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.