Chaitanya's Random Pages

November 30, 2012

Statistical recap of the Australia-South Africa test match in Adelaide

Filed under: cricket,sport — ckrao @ 8:45 pm

The recent second cricket test between Australia and South Africa in Adelaide finished in an exciting draw with so many memorable phases. Here are some tidbits with more highlights here.

On the first day Australia set a frenetic pace reaching 5/482 in 86.5 overs (run rate 5.55) which from this list looks like the most runs made by a team in a day with a run rate exceeding 5 runs per over. Their total of 550 in 107.2 (run rate 5.12) ended up being the third highest run rate for a completed test innings. Australia were 3/55 at one stage before Warner and Clarke added 155 in just 24.2 overs (run rate 6.37)! Interestingly there have only ever been three other partnerships of 150+ in fewer than 150 balls in test cricket (noting that only in more recent times have the length in balls of partnerships been recorded), and Clarke features again in of them.

  1. Hayden and Ponting (151* in 24.2 overs) vs Zimbabwe in Sydney, 2003
  2. Clarke and Gilchrist (162* in 20 overs) vs England in Perth, 2006 (while Gilchrist smashed 102* off 59 balls, Clarke remained 135*)
  3. Kamran Akmal and Shahid Afridi (170 in 21.3 overs) vs India in Lahore, 2006 (in this game only 8 wickets fell in two innings and there were 6 century-makers!)

Straight after lunch on the first day the number of runs per over were 10, 10, 11, 6, 9, 17, 8, 6, 16: 93 runs in 9 overs! Warner scored 50 off 26 in that time finally falling for 119 off 112 balls. In all 178 runs off just 26 overs were scored in the middle session.

The next partnership between Clarke and Hussey was worth 272 runs in just 49.3 overs, with Hussey bringing up his second century of the series. Clarke at one stage had 33 4s in reaching 168* with more 4s than singles (28)! He ended up with 224 runs for the day despite coming in during the 15th over. Only eleven times have more runs been scored by a batsman in a day of test cricket, three of those times by Bradman and three more by Sehwag. Clarke also became the first person in test cricket history to score 4 double centuries in the same calendar year (in just his 8th test). (Don Bradman once scored 4 double centuries in the space of 7 tests in 1930-31.) Clarke must have tremendous stamina and concentration to achieve such a feat. He currently averages over 100 in both Brisbane (916 runs @ 114.5 in 9 tests, 11 innings with 4 100s) and Adelaide (1109 runs in 8 tests, 13 innings with 5 100s).

Imran Tahir ended up with bowling figures of 23 overs for 180 in the first innings and 14 overs for 80, to concede the most runs in a match without taking a wicket. The first innings economy rate in fourth in this list of expensive bowling analyses in a test innings (minimum 10 overs).

Australia set South Africa 430 to win in well over 4 sessions and after South African slumped to 4/45 it seemed like the game might end on the fourth day. Wickets 5 to 10 then survived for 762 balls, the most in the fourth innings in a test. South Africa managed to defy the Australian attack for a total of 148 overs, the longest fourth innings in overs since England’s effort against South Africa in 1995 (in that game Mike Atherton and Jack Russell batted together for the last 274 minutes). After the fourth wicket fell it was Faf du Plessis on debut and AB de Villiers who dug deep and blunted the attack, with a partnership of 89 runs in 68 overs (32 in the first 29 overs including 1 run in a stretch of 8 overs).

According to this list AB de Villiers with his 33 off 220 balls set a record for the longest test innings in balls faced without scoring a b0undary (in games in which this was recorded). There are only two longer individual innings in minutes where a boundary was not scored:

  1. Jimmy Adams scored 48* off 212 balls in 334 minutes vs Pakistan in 2000
  2. Colin McDonald scored 47 off 169 balls in 248 minutes vs England in 1958/59

It was also the second slowest 30+ score in test history, second to Chris Tavare’s 35 off 240 balls.

Nathan Lyon toiled for 50 overs conceding just 49 runs. The last time someone bowled as many maidens (31) as he did was back in 1982 by Dilip Doshi according to this list.

Du Plessis stayed until the very end, having by far the longest innings by a debutant in the final innings of a test. He survived for 466 minutes and 376 balls while the next best by a debutant was 313 minutes. Even by a non-debutant only six individual fourth innings have lasted longer. What an amazing way to start a test career!

 

November 28, 2012

An easier way to square some 2×2 matrices

Filed under: mathematics — ckrao @ 11:16 am

The Cayley-Hamilton theorem states that a square matrix satisfies its characteristic equation. That is, if A is a matrix with characteristic equation p(x) = \det (x I - A) then p(A) = 0. (Here I is the identity matrix of the same dimension of A.)

The characteristic equation of a 2×2 matrix is a quadratic of the form p(x) = (x - \lambda_1)(x - \lambda_2) = x^2 - a x+ b, where a = \lambda_1 + \lambda_2and b = \lambda_1 \lambda_2, where \lambda_1 and \lambda_2 are the eigenvalues of the matrix A. Since the sum of the eigenvalues of a matrix is the sum of its diagonal elements (the trace) and the product of the eigenvalues is the determinant, we can rewrite this as

\displaystyle p(x) = x^2 - \text{tr} (A) x + \det (A).

By the Cayley-Hamilton theorem,

\displaystyle 0_{2 \times 2} = A^2 - \text{tr}(A) A + \det (A) I,

from which

\displaystyle A^2 = \text{tr} (A) A - \det (A) I.

In certain cases this formula might be an easier way to calculate the square of a 2×2 matrix than matrix multiplication, especially if the determinant is a nice number.

For example, if A = \left[ \begin{array}{cc} 3 & 2 \\ 1 & 1 \end{array} \right], we easily see that its trace is 3 + 1 = 4 and its determinant is 3\times 1 - 2 \times 1 = 1, so

\displaystyle A^2 = 4A - I = \left[ \begin{array}{cc} 4\times 3 - 1 & 4 \times 2 \\ 4 \times 1 & 4 \times 1 - 1\end{array} \right] = \left[ \begin{array}{cc} 11 & 8 \\ 4 & 3\end{array} \right].

The same formula may be applied a second time if we wish to find A^3:

\begin{aligned} A^3 &= A. A^2\\ &= A(\text{tr} (A) A - \det (A) I)\\ &= \text{tr} (A) A^2- \det (A) A \\ &= \text{tr} (A) (\text{tr} (A) A - \det (A) I) - \det (A) A \\ &= \left( \left( \text{tr} (A) \right)^2 - \det (A) \right) A - \text{tr} (A) \det (A) I. \end{aligned}

So in our example,

\displaystyle \left[ \begin{array} {cc} 3 & 2 \\ 1 & 1 \end{array} \right] ^3 = (4^2 - 1) A - 4 \times 1 I = \left[ \begin{array}{cc} 41 & 30 \\ 15 & 14 \end{array} \right] .

Finally, in case you were wondering how the Cayley-Hamilton theorem can be proved, one way is via the equation

\displaystyle X (\text{adj} (X) ) = \det (X) I.

The adjugate \text{adj} (X) of an n \times n matrix is a matrix of (n-1) \times (n-1) determinants up to sign. The equation may be proved by considering the (i,j) entry of each side and using the alternating sum formula for the determinant of a matrix. All that we need to be concerned with here is that if X = xI - A then \text{adj} (X) is a polynomial of degree n-1. We can then write the above equation as

\displaystyle (x I - A) (x^{n-1} B_{n-1} + x^{n-2} B_{n-2} + \ldots + B_0) = (x^n + a_{n-1} x^{n-1} + \ldots + a_0)I,

where B_0, B_1, \ldots B_{n-1} are constant matrices and a_0, a_1, \ldots a_{n-1} are constant scalars.

From this we simply match coefficients of powers of x of each side. (For convenience set B_{-1} = B_n = 0.)

\displaystyle B_{k-1} - A B_k = a_k I, \quad k = 0, 1, \ldots n.

Multiplying both sides of this equation on the left by A^k and then summing from k =0 to n gives

\displaystyle \sum_{k=0}^n a_k A^k = \sum_{k=0}^n (A^k B_{k-1} - A^{k+1} B_k) = A^0 B_{-1} - A^{n+1} B_n = 0.

But the left side of this equation is the characteristic equation \sum_{k=0}^n a_k x^k evaluated at A, and we are done.

November 20, 2012

Federer’s record at the ATP World Tour Finals

Filed under: sport — ckrao @ 8:05 pm

One of the most amazing statistics related to the career of Roger Federer is that at the year-ending ATP World Tour Finals featuring the world’s top eight players, he had won a set in every match he played (i.e. he had never lost in straight sets). This was the case until his narrow 6-7 5-7 loss to world number 1 Novak Djokovic in last week’s fantastic final, his 51st match at the prestigious event. Imagine playing 50 matches over 11 years against the top players and always winning at least one set! The following table shows his nine losses.

Match # Year Round Opponent Opp Ranking Score
4 2002 S Lleyton Hewitt (AUS) 1 5-7, 7-5, 5-7
19 2005 F David Nalbandian (ARG) 12 7-6(4), 7-6(11), 2-6, 1-6, 6-7(3)
25 2007 RR Fernando Gonzalez (CHI) 7 6-3, 6-7(1), 5-7
30 2008 RR Gilles Simon (FRA) 9 6-4, 4-6, 3-6
32 2008 RR Andy Murray (GBR) 4 6-4, 6-7(3), 5-7
35 2009 RR Juan Martin Del Potro (ARG) 5 2-6, 7-6(5), 3-6
36 2009 S Nikolay Davydenko (RUS) 7 2-6, 6-4, 5-7
49 2012 RR Juan Martin Del Potro (ARG) 7 6-7(3), 6-4, 3-6
51 2012 F Novak Djokovic (SRB) 1 6-7(6), 5-7

As can be seen until 2007 he had a win-loss record of 22-2 and three times won the tournament twice in a row!

Reference

Tennis – ATP World Tour – Tennis Players – Roger Federer

November 16, 2012

When is a matrix the inverse of itself?

Filed under: mathematics — ckrao @ 11:51 am

Recently I was playing around with matrices and noticed that matrices such as \displaystyle \left[ \begin{array}{cc} 1 & 0 \\ -1 & -1 \end{array} \right] and \displaystyle \left[ \begin{array}{cc} 1 & 0 \\ 1 & -1 \end{array} \right] are equal to their inverse. In other words, they are matrices A such that A^{-1} = A or A^2 = I where I is the 2 by 2 identity matrix. This led me to wonder which 2×2 matrices in general had this property. I may have worked this out previously but I could not recall the condition. In this post we’ll see the general form of such matrices and then generalise the result to higher dimensions.

For 2×2 matrices the inverse of the matrix \displaystyle \left[ \begin{array}{cc} a & b \\ c & d \end{array} \right] is \displaystyle \frac{1}{ad-bc} \left[ \begin{array}{cc} d & -b \\ -c & a \end{array} \right] , where ad -bc \neq 0.

Hence matching one of the entries of these two matrices, b = \frac{-b}{ad-bc}. From this, either b= 0 or ad -bc = -1.

1) If b = 0, the inverse becomes

\displaystyle \left[ \begin{array}{cc} 1/a & 0 \\ -c/ad & 1/d \end{array} \right] ,

from which a = 1/a, d = 1/d and c = -c/ad (and hence c = 0 or ad = -1). This leads to the forms \displaystyle \left[ \begin{array}{cc} \pm 1 & 0 \\ 0 & \pm 1 \end{array} \right] , \left[ \begin{array}{cc} \pm 1 & 0 \\ c & \mp 1 \end{array} \right].

2) If ad -bc = -1, the inverse becomes

\displaystyle \left[ \begin{array}{cc} -d & b \\ c & -a \end{array} \right] ,

from which a = -d. This leads to the form \displaystyle \left[ \begin{array}{cc} a & b \\c & -a \end{array} \right] where a^2 + bc = 1.

Combining the two cases (and noting that there is overlap between the two) , we conclude that the 2×2 matrices that are inverses of themselves are either

  • \displaystyle I = \left[ \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right]
  • \displaystyle -I = \left[ \begin{array}{cc} -1 & 0 \\ 0 & -1 \end{array} \right]
  •   \displaystyle \left[ \begin{array}{cc} a & b \\c & -a \end{array} \right] where a^2 + bc = 1.

To check for this final case we simply need to ensure that (1) the matrix has determinant -1 and (2) the matrix has diagonal entries summing to 0. For example, the matrix \displaystyle A = \left[ \begin{array}{cc} 3 & 2 \\-4 & -3 \end{array} \right] has this property so we can immediately say A^2 = I, or indeed A^{17} = A if we desire. 🙂

An alternative approach, that works more generally for nxn matrices, uses some knowledge of linear algebra. Our desired matrices satisfy the equation A^2 = I or A^2 - I = 0. Hence the minimal polynomial of A is a factor of x^2 -1 = (x-1)(x+1). If it is either (x-1) or (x+1) this corresponds to the solutions A = \pm I. If the minimal polynomial is (x-1)(x+1), the fact that there are no repeated factors (i.e. each root has multiplicity 1) implies that A is diagonalisable. In this case, A is similar to a diagonal matrix with +1 or -1 as the diagonal entries.

Hence A = \pm I_n or A = Q DQ^{-1} where D = \displaystyle \left[ \begin{array}{cc} I_r & 0_{r\times s} \\ 0_{s \times r} & -I_s \end{array} \right] , r + s = n and I_k represents the k \times k identity matrix (and 0_{m \times n} is an m \times n submatrix of 0s). In the special case of n = 2 this means we can also write A = Q DQ^{-1} with \displaystyle Q = \left[ \begin{array}{cc} a & b \\ c & d \end{array} \right] and \displaystyle D = \left[ \begin{array}{cc} 1 & 0 \\ 0 & -1 \end{array} \right] and obtain

\displaystyle A = \frac{1}{ad - bc} \left[ \begin{array}{cc} ad + bc & -2ab \\ 2cd & -ad -bc \end{array} \right].

Note here that the diagonal entries sum to 0 and \displaystyle \det A = \frac{-(ad + bc)^2 + 4abcd}{(ad - bc)^2} = -1.

Matrices that satisfy A = A^{-1} or A^2 = I are known as involutory. Such matrices have applications in cryptography where it may be useful for the same matrix operation to act as its inverse in decryption. We have the following two further characterisations of involutory matrices (holding true in any field of characteristic not equal to 2).

  1. A = 2P - I, where P satisfies P^2 = P (P is then known as an idempotent matrix).
    To see this, simply note that if A^2 = I, the matrix P:= (I+A)/2 is idempotent since P^2 = (I + A)^2/4 = (A^2 + 2A + I)/4 = (2I + 2A)/4 = P. Conversely, if A = 2P - I, then A^2 = (2P-I)^2 = 4P^2 - 4P + I = 4P - 4P + I = I.
  2. (See [1]) A = \pm I or A = I_n - Q_2 P_2 where Q_2 is n \times s, P_2 is s \times n and P_2 Q_2 = 2I_s.

To see this, we write A = Q^{-1}DQ as before and partition Q and Q^{-1} as \displaystyle Q = \left[ \begin{array}{cc} Q_1' & Q_2' \end{array} \right] , \displaystyle Q^{-1} = \left[ \begin{array}{c} P_1 \\ P_2 \end{array} \right] where Q_2 is n \times s and P_2 is s \times n. Then QQ^{-1} = I_n = Q_1 P_1 + Q_2 P_2 while \displaystyle Q^{-1} Q = \left[ \begin{array}{cc} P_1 Q_1' & P_1 Q_2' \\ P_2 Q_1' & P_2 Q_2' \end{array} \right] = \left[ \begin{array}{cc} I_r & o \\ 0 & I_s \end{array} \right] .

Then

\begin{aligned} A &= Q D Q^{-1} \\ &= \left[ \begin{array}{cc} Q_1' & Q_2' \end{array} \right] \left[ \begin{array}{cc} I_r & 0_{r\times s} \\ 0_{s \times r} & -I_s \end{array} \right] \left[ \begin{array}{c} P_1 \\ P_2 \end{array} \right] \\ &= Q_1' P_1 - Q_2'P_2\\ &= I_n - Q_2'P_2 - Q_2'P_2\\ &= I_n - Q_2 P_2, \end{aligned}

where Q_2 = 2Q_2' and P_2 Q_2 = 2P_2 Q_2' = 2 I_s.

The converse (that if A has this form then it is involutory) is easier to prove: if P_2 Q_2 = 2I_s then

\displaystyle (I - Q_2 P_2)^2 = I^2 + Q_2 P_2 Q_2 P_2 - 2 Q_2 P_2 = I + 2 Q_2 P_2 - 2 P_2 P_2 = I.

As an example, since \displaystyle \left[ \begin{array}{ccc} 1 & 3 & 2 \end{array} \right] \left[ \begin{array}{c} 1 \\ 3 \\ -4\end{array} \right] = 1 + 9 - 8 = 2 = 2I_1, the matrix

\displaystyle P = \left[ \begin{array}{ccc} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{array} \right] - \left[ \begin{array}{c} 1 \\ 3 \\ -4 \end{array} \right] \left[ \begin{array}{ccc} 1 & 3 & 2 \end{array} \right] = \left[ \begin{array}{ccc} 0 & -3 & -2 \\ -3 & -8 & -6 \\ 4 & 12 & 9 \end{array} \right]

has the property that P^2 = I_3 or P^{-1} = P.

Reference

[1] J. Levine and H. M. Nahikian, On the Construction of Involutory Matrices, The American Mathematical Monthly, Vol. 69, No. 4 (Apr 1962), pp. 267-272.

Blog at WordPress.com.

%d bloggers like this: