Matrix isn’t using Activitypub, so it isn’t compatible with the rest of the fediverse. However, with Matrix anybody can host a chat server and all servers interact with each other. So just like the rest of the fediverse, Matrix is fully decentralized, free, and open source.