Title: What is Matrix?
Author: Alex Kirk
Published: February 2, 2023
Last modified: October 26, 2023

---

# What is Matrix?

February 2, 2023

I am working on [bringing Matrix to the WordPress community](https://make.wordpress.org/meta/2023/01/25/a-meta-subproject-for-evaluating-matrix/)(
see also the [WP Tavern post](https://wptavern.com/wordpress-project-to-evaluate-replacing-slack-with-matrix-open-source-chat))
and part of this is also to explain what [Matrix](https://matrix.org/) actually 
is, so I wrote up a few paragraphs that I’d like to share here:

Matrix is an internet-based chat system like [Slack](https://slack.com/) or [Microsoft Teams](https://www.microsoft.com/microsoft-teams/)
with a few key differences:

#### Open Source

It is open source (Apache License 2.0). Thus it includes the four freedoms (run 
it for any purpose, modify it, distribute it or a modified version).

#### Federated

There is no centrally controlled server, similar to e-mail (or [ActivityPub](https://www.w3.org/TR/activitypub/)):
to send and receive e-mail, you need to have an account on a mail server. In Matrix,
these servers are called [homeservers](https://matrix.org/docs/guides/introduction).

When you send messages, these messages are first sent from your client (computer
or phone) to the server, from the server to the recipients’ servers (in e-mail, 
you manually list them, in Matrix, these are all other people in the room), and 
then the messages are delivered to the individual participant’s clients. The benefit
of this is that the client (like a mobile phone app) doesn’t need to be connected
when the server receives the message and can catch up when it comes back online.

For this reason, Matrix account addresses look similar to e-mail (or Mastodon) addresses
but they have the format [@username:server.tld](https://spec.matrix.org/latest/#users).
Starting when a member of a homeserver joins a room, their homeserver will maintain
a full, up-to-date copy of the chat room. Any message sent by others in the room
will be sent to every participating homeserver. For this reason, joining a room 
can take a while because the server needs to (partially) populate its local copy
from other homeservers. Because of the real-time nature of chat, the messages are
exchanged very quickly between the homeservers as soon as that connection has been
established.

A Matrix server can also be run in unfederated mode where it will not communicate
with other servers on the internet, thus enabling a closed community. This decision
can also be made on a room-by-room basis.

#### Encryption

Matrix rooms can be either unencrypted and openly discoverable, or end-to-end encrypted
and invite-only. Because the server has no knowledge of contents or encryption keys,
the latter need to be shared between the individual client software of a user. This
is established through a verification step in which you use your other/old client
to establish trust with the new one. Until this has happened, any encrypted communication
is inaccessible.

#### Open Protocol

The [Matrix protocol](https://spec.matrix.org/latest/) (and all of its [updates, called MSC](https://spec.matrix.org/proposals/))
is publicly available and can be implemented by any software. There are [a couple of server implementations](https://matrix.org/faq/#can-i-write-a-matrix-homeserver%3F)
with best known ones by Element themselves, called [Synapse](https://github.com/matrix-org/synapse)(
Python based) and [Dendrite](https://github.com/matrix-org/dendrite) (Go based).
Clients are easier to implement through [Matrix provided SDKs](https://matrix.org/faq/#how-do-i-matrix-enable-my-existing-app%3F)
that do the heavy lifting of encryption and protocol communication.

#### Free Choice of Clients

For the above reason, there is [a wide selection of clients](https://matrix.org/clients/)
for mobile and desktop, different operating systems, text based, etc. We have developed
a WordPress plugin called [Chatrix](https://github.com/Automattic/chatrix) that 
allows embedding Matrix inside a WordPress post or page which allows something like
we demonstrated in this GIF:

![](https://alex.kirk.at/wp-content/uploads/sites/2/2023/02/chatrix.gif)

[Matrix](https://alex.kirk.at/category/matrix/)

Read this next

[House full of books](https://alex.kirk.at/2023/01/31/house-full-of-books/)

## 3 responses to “What is Matrix?”

 1.  ![Jeremy Herve Avatar](https://secure.gravatar.com/avatar/?s=48&d=mm&r=g)
 2.  [Jeremy Herve](https://herve.bzh)
 3.  [February 2, 2023](https://alex.kirk.at/2023/02/02/what-is-matrix/comment-page-1/#comment-84623)
 4.  Thanks for this!
 5.  I would have a question about this part:
 6.  >  Starting when a member of a homeserver joins a room, their homeserver will 
     > maintain a full, up-to-date copy of the chat room. Any message sent by others
     > in the room will be sent to every participating homeserver. For this reason,
     > joining a room can take a while because the server needs to (partially) populate
     > its local copy from other homeservers
 7.  What happens if different homeservers have a different local copy (maybe one of
     them is corrupted, incomplete, altered)? Which server acts as the source of truth
     in case of conflicts?
 8.  [Log in to Reply](https://alex.kirk.at/wp-login.php?redirect_to=https%3A%2F%2Falex.kirk.at%2F2023%2F02%2F02%2Fwhat-is-matrix%2F)
 9.   a. ![Alex Kirk Avatar](https://alex.kirk.at/wp-content/uploads/sites/2/2025/06/cropped-
         2025.Alex-512x512-1-48x48.jpg)
      b. [Alex Kirk](https://alex.kirk.at/)
      c. [February 2, 2023](https://alex.kirk.at/2023/02/02/what-is-matrix/comment-page-1/#comment-84624)
      d. The spec has a section on [Room State Resolution](https://spec.matrix.org/v1.5/server-server-api/#room-state-resolution)
         which depends on the version of the room. The currently latest [version 10 has an algorithm described](https://spec.matrix.org/v1.5/rooms/v10/#state-resolution)
         which I have not yet read. I have yet to understand if all homeservers should
         come to the same state conflict resultion on their own or whether the homeservers
         end up agreeing on a specific resolution.
      e. [Log in to Reply](https://alex.kirk.at/wp-login.php?redirect_to=https%3A%2F%2Falex.kirk.at%2F2023%2F02%2F02%2Fwhat-is-matrix%2F)
 10. ![Billy Wilcosky Avatar](https://secure.gravatar.com/avatar/?s=48&d=mm&r=g)
 11. [Billy Wilcosky](https://wilcosky.com)
 12. [February 5, 2023](https://alex.kirk.at/2023/02/02/what-is-matrix/comment-page-1/#comment-84625)
 13. I love this and I’m hoping I find time to look into it again. I say again because
     I tried this out as soon as I saw you publish it on GitHub. Everything seems great
     at first but I started noticing quirks. All of which may be my fault. For example,
     I would try signing in from another device, or get logged out and log back in,
     and then suddenly I couldn’t find the server or room I created.
 14. I was thinking it could be because I was trying to use Matrix’s main server. Maybe
     a moderation removed the room I created or something like that.
 15. I don’t think what I experienced has to do with the plugin; it’s probably Matrix
     itself mixed with me not fully understanding how it works.
 16. [Log in to Reply](https://alex.kirk.at/wp-login.php?redirect_to=https%3A%2F%2Falex.kirk.at%2F2023%2F02%2F02%2Fwhat-is-matrix%2F)

### Leave a Reply 󠀁[Cancel reply](https://alex.kirk.at/2023/02/02/what-is-matrix/comment-page-1/?output_format=md#respond)󠁿

Only people in [my network](https://alex.kirk.at/friends/) can comment.

This site uses Akismet to reduce spam. [Learn how your comment data is processed.](https://akismet.com/privacy/)