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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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