diff --git a/README.md b/README.md
index 8ba54e2..64ce023 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://docs.python.org/3/)
+[](https://python.org/downloads)
[](https://github.com/theochem/matrix-permanent/actions/workflows/pull_request.yml)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
@@ -37,9 +37,10 @@ Compute the permanent of a matrix using the best algorithm for the shape of the
Compute the permanent of a matrix combinatorically.
**Formula:**
-```math
+
+$$
\text{per}(A) = \sum_{\sigma \in P(N,M)}{\prod_{i=1}^M{a_{i,{\sigma(i)}}}}
-```
+$$
**Parameters:**
@@ -55,29 +56,31 @@ Compute the permanent of a matrix combinatorically.
**Formula:**
-```math
+$$
\text{per}(A) = \frac{1}{2^{N-1}} \cdot \sum_{\delta \in \left[\delta_1 = 1,~ \delta_2 \dots \delta_N=\pm1\right]}{
\left(\sum_{k=1}^N{\delta_k}\right){\prod_{j=1}^N{\sum_{i=1}^N{\delta_i a_{i,j}}}}}
-```
+$$
**Additional Information:**
The original formula has been generalized here to work with $M$-by-$N$ rectangular permanents with
$M \leq N$ by use of the following identity (shown here for $M \geq N$):
-```math
+$$
+\begin{aligned}
\text{per}\left(\begin{matrix}a_{1,1} & \cdots & a_{1,N} \\ \vdots & \ddots & \vdots \\ a_{M,1} & \cdots & a_{M,N}\end{matrix}\right) = \frac{1}{(M - N + 1)!} \cdot \text{per}\left(\begin{matrix}a_{1,1} & \cdots & a_{1,N} & 1_{1,N+1} & \cdots & 1_{1,M} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{M,1} & \cdots & a_{M,N} & 1_{M,N+1} & \cdots & 1_{M,M}\end{matrix}\right)
-```
+\end{aligned}
+$$
This can be neatly fit into the original formula by extending the inner sums over $\delta$ from $[1,M]$ to $[1,N]$:
-```math
+$$
\text{per}(A) = \frac{1}{2^{N-1}} \cdot \frac{1}{(N - M + 1)!}\cdot \sum_{\delta \in \left[\delta_1 = 1,~ \delta_2 \dots \delta_N=\pm1\right]}{
\left(\sum_{k=1}^N{\delta_k}\right)
\prod_{j=1}^N{\left(
\sum_{i=1}^M{\delta_i a_{i,j}} + \sum_{i=M+1}^N{\delta_i}
\right)}
}
-```
+$$
**Parameters:**
@@ -93,7 +96,7 @@ This can be neatly fit into the original formula by extending the inner sums ove
**Formula:**
-```math
+$$
\text{per}(A) = \sum_{k=0}^{M-1}{
{(-1)}^k
\binom{N - M + k}{k}
@@ -103,7 +106,7 @@ This can be neatly fit into the original formula by extending the inner sums ove
}
}
}
-```
+$$
**Parameters:**
@@ -181,4 +184,4 @@ is with pip.
# License
This code is distributed under the GNU General Public License version 3 (GPLv3).
-See for more information.
\ No newline at end of file
+See for more information.