Can I lose rank for inactivity?
Solution 1:
You can only derank for losing games.
Source: Personal knowledge. Also you can find this out very quickly by googling, however I found this very recent post from the offical forum, which proves my knowledge as I didn't play for a longer time.
Solution 2:
With the end of Preseason and the start of Season 1 half a year ago, the previous answer is now partially incorrect - you can definitely lose rank for inactivity in the Grandmasters League.
The GM league is basically the top 200 players on a server (500 in Season 1), based not on MMR but on Ranked points. At time of writing, a player with 263 points will get Grandmaster IF the ranking does not change in 24 hours. Similarly, the 200th player with (currently) 262 points now will be dropped out of the Grandmaster league if anyone in the Masters league achieves at least 263 points by the next update.
So if you're inactive in the Grandmasters league, your rank will almost definitely fall (unless you have a huge lead of rank points). And if you're sitting near the bottom of the Grandmasters league, you can expect to drop back to Masters rank (i.e. losing the Grandmasters rank) should you choose to become inactive.
If you want advice on a 'safe' rank point milestone to reach before becoming inactive, looking at the 200th place for Season 1 (2579) and Season 2 (2570), I would say that hitting 3500 points then going inactive would probably let you keep your rank by the end of Season 3. This number will likely increase for future seasons.
Source: Myself. I de-ranked from Grandmaster by hitting it and then not playing ranked games.