BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Amink
Fluorite | Level 6

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.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller
WarrenKuhfeld
Ammonite | Level 13

@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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

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.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 645 views
  • 0 likes
  • 3 in conversation