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
Rhodochrosite | Level 12

@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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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
  • 384 views
  • 0 likes
  • 3 in conversation