I recently did this exercise and I was hoping to get some feedback on my proof.     Given an real matrix $A$ such that $A^2=A$. Show that A is   diagonalizable.   Proof: Assume that $A \in R^{nxn}$, and assume that we have the linear map $V \longrightarrow V$ such that $x \mapsto Ax$, where $V$ is an arbitraty vector space with $\dim V = n &lt; \infty$.  $A$ is diagonalizable if there exists a matrix $T$ such that $D = T^{-1}AT$, where $T$ is the matrix with $n$ linearly independent eigenvectors of $A$ and $D=diag(\lambda_1,...\lambda_k)$ if we assume $k$ eigenvalues to $A$.  Note that for any vector $x\neq0 \in V$ we have $Ax = \lambda x$ but also $Ax=A^2x=A(Ax)=A(\lambda x)=\lambda(Ax) = \lambda^2x$ and thus $(\lambda-\lambda^2)x=0$  and so the only eigenvalues to $A$ is $\lambda_0=0$ and $\lambda_1=1$.  Call the corresponding eigenspaces $E_0 = \{x\in V | Ax=0\} =: \ker(A)$ and $E_1=\{x\in V | Ax=x\}$  Thus, we can express $V = E_0 \bigoplus E_1$ and it follows that $\dim V = n =\dim E_0 + \dim E_1$ and thus we know that we have a set of $n$ linearly independent eigenvectors.  Therefore $A$ is diagonalizable. $\blacksquare$  The last step is where I'm a bit unsure. I'm thinking that because we only have two eigenvalues, the space $V$ must be a direct sum of the two corresponding eigenspaces, am I right? Also, am I right when I say that because the sum of the dimensions of the two eigenspaces is $n$, we know for sure that we have $n$ linearly independent eigenvectors? I think that makes sense.  Cheers
How to prove that any idempotent matrix is diagonalizable?
Everytime, I read about blackbody, I always get confused at the point where it is written     Under thermal equilibrium conditions , the blackbody radiation depends only on temperature. ..... . At equilibrium , electromagnetic waves bounce around with the walls of the cavity.   What is this equilibrium all about? Why is it important here?? If there is thermal equilibrium, why does the body radiate?? Please help. For example, in this text:     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eu tellus vel nunc pretium lacinia. Proin sed lorem. Cras sed ipsum. Nunc a libero quis risus sollicitudin imperdiet.   I want to match the word after 'ipsum'. I have 24 accounts, how can I delete them all in one go? Is there a way to delete all stack exchange accounts at the same time?  I also want to remove all traces of my posts on the site. Is that possible?   Will I have to delete all of my posts manually?  Can I use the stack exchange API for this? Regular Expression to match valid dates I'm trying to write a regular expression that validates a date.  The regex needs to match the following   M/D/YYYY MM/DD/YYYY Single digit months can start with a leading zero (eg: 03/12/2008) Single digit days can start with a leading zero (eg: 3/02/2008) CANNOT include February 30 or February 31 (eg: 2/31/2008)   So far I have   ^(([1-9]|1[012])[-/.]([1-9]|[12][0-9]|3[01])[-/.](19|20)\d\d)|((1[012]|0[1-9])(3[01]|2\d|1\d|0[1-9])(19|20)\d\d)|((1[012]|0[1-9])[-/.](3[01]|2\d|1\d|0[1-9])[-/.](19|20)\d\d)$   This matches properly EXCEPT it still includes 2/30/2008 &amp; 2/31/2008.  Does anyone have a better suggestion?  Edit: I found  on RegExLib  ^((((0[13578])|([13578])|(1[02]))[\/](([1-9])|([0-2][0-9])|(3[01])))|(((0[469])|([469])|(11))[\/](([1-9])|([0-2][0-9])|(30)))|((2|02)[\/](([1-9])|([0-2][0-9]))))[\/]\d{4}$|^\d{4}$   It matches all valid months that follow the MM/DD/YYYY format.  Thanks everyone for the help. How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.  Excel 2007 has a possible range of 1 to 16384, which is the number of columns that it supports. The resulting values should be in the form of excel column names, e.g. A, AA, AAA etc. What do you call someone who solves puzzles? What is a term or name for someone who is very adept at solving puzzles or situations that require though processing and logic.   I ran across , however this only deals with crossword puzzles. I'm looking for something that could be applied on a broader sense. What's the standard "roadmap" to learning quantum physics? Two submit buttons in one form I have two submit buttons in a form. How do I determine which one was hit serverside? I have seen many ways to make a USB an installer for about any Windows OS. But how can I (using grub or something like that) make it bootable to all editions on Windows XP and 7?   I have tried Googling it and researching, I've even tried to do it, But I dont understand much about GRUB or linux at all.  Please keep in mind that I am not very good with linux, so please use as many details as possible. How can we prove charge invariance under Lorentz Transformation? We have gravitational force between two massive particles and we have electromagnetic force between two charged particles. When special relativity suggests that mass is not an invariant quantity why we have electric charge as an invariant quantity ? $(p\!-\!1\!-\!h)!\,h! \equiv (-1)^{h+1}\!\!\pmod{\! p}\,$ [Wilson Reflection Formula] A uniformly continuous function maps bounded set to bounded sets I am trying to prove the following:  If $A\subset\mathbb R$ is bounded and $\,f:A\to \mathbb R\,$ is uniformly continuous, then $f[A]$ is bounded.  Could you check my proof?  Let $A \subseteq [-K,K]\subseteq \mathbb R$. Let $\varepsilon = 1$. If $f$ is uniformly continuous there is $\delta$ wuth $|x-y| &lt;\delta$ imply that $|f(x)-f(y)|&lt;1$ for all $x,y\in A$. Let $a \in A$. Then because $A$ is bounded there is a finite number of balls $B(a_n,\delta)$ that cover $A$. Let the number be $N$. Then $f(a)-N \le f(x) \le f(a) + N$ for all $x\in A$. I have a  to which I'd like to add JPEG and PNG images that I generate on the fly.  All the examples I've seen so far in the , specially in the  use ImageIcons.  I'm generating these images as byte arrays, and they are usually larger than the common icon they use in the examples, at 640x480.   Is there any (performance or other) problem in using the ImageIcon class to display an image that size in a JPanel? What's the usual way of doing it? How to add an image to a JPanel without using the ImageIcon class?   Edit: A more careful examination of the tutorials and the API shows that you cannot add an ImageIcon directly to a JPanel. Instead, they achieve the same effect by setting the image as an icon of a JLabel. This just doesn't feel right... Is there a difference between "" and {} in BibTeX? JQuery Selector for dynamic id How to add border to listview and different row colors at the same time How do I (or can I) SELECT DISTINCT on multiple columns? I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to an active status.  So I'm thinking:  UPDATE sales SET status = 'ACTIVE' WHERE id IN (SELECT DISTINCT (saleprice, saledate), id, count(id)              FROM sales              HAVING count = 1)   But my brain hurts going any farther than that. How to prepare files for rsync on a case insensitive filesystem? I am transferring a large number of files on a HFS+ filesystem.  The files are currently on ext2 partitions.  I have conflicts due to case insensitivity of the target partition (HFS+).  I want to identify the files that have duplicates filenames once they are in lower case, and delete them if they are actually duplicates.  I also found that I will have duplicate folder names if I convert everyhing to lower case. Basically these hard drives contain years of unsorted data, and I happen to have this problem with folder names too.   Does this seem reasonable:  find . -type f | while read f; do echo $f:l; done | sort | uniq -d    $f:l is ZSH for convert to lower case.  Now I want to keep only one instance of each file that have duplicates. How to do this efficiently ?  I do not want to find files with duplicate content, unless they have the same lower case filename. I will deal with duplicates later. Can quarks be considered real and elementary? After 4 years of being a Mac user, there is only one thing that I still miss from the Windows world, and that is being able to switch with a single keystroke between all open windows in the computer.  What is the best app or utility, free or not, for accomplishing that?  I've used , but I never was completely satisfied with it. It's a bit slow and the switcher UI is not very pretty.  Do you know any alternative?    EDIT (2016): This question keeps getting views and upvotes after 6 years. When I asked this question in 2010 I was still transitioning from being a Windows user. Eventually, I got used to Mac OS X UI and nowadays I don't use any third party utility for managing app windows, just Mission Control and the native keyboard shortcuts. So, although this question is no longer relevant for me I hope it is useful to new Mac users making the switch (Including this comment).