MedCalc # EIG matrix function

## Description

EIG(A[,v]) returns the Eigenvalues of matrix A. Optionally, the eigenvectors are stored in the workspace variable v.

• EIG(A) returns a column vector containing the eigenvalues of square matrix A
• EIG(A,v) returns a diagonal matrix (D) of eigenvalues and stores into workspace variable v a matrix whose columns are the corresponding right eigenvectors, so that A*V = V*D.

### Workspace variables

The value of a workspace variable is not stored in the spreadsheet, but in a separate memory space. The workspace variable name cannot be equal to a spreadsheet cell address (such as A1 or DC12), a spreadsheet function, or to a reserved word. In addition, it cannot contain a space or a character from the reserved character set: - + / * = < > # & @ \$ | ^ : , ; . ( ) ' " [ ] { }.

## Example

In the following example:

• in cell D3 a square matrix is created from the data in cell range A1 to C3.
• in cell D5 the formula EIG(D3,v) calculates and shows the Eigenvalues of the matrix created in cell D3, and stores the Eigenvectors in a workspace variable named "v".
• cell D6 contains v and shows the Eigenvectors that are stored in the workspace variable "v". ## Calculator

EIG( Eigenvalues.mc1
{"ft_lang_label":"__label__en","ft_lang_prob":0.8430082,"math_prob":0.9713926,"size":1555,"snap":"2023-40-2023-50","text_gpt3_token_len":364,"char_repetition_ratio":0.14313346,"word_repetition_ratio":0.014705882,"special_character_ratio":0.23408361,"punctuation_ratio":0.10452962,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9976182,"pos_list":[0,1,2,3,4,5,6,7,8,9,10],"im_url_duplicate_count":[null,null,null,null,null,1,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-04T12:44:56Z\",\"WARC-Record-ID\":\"<urn:uuid:6de24848-08f8-4f46-b71e-deb77a98570c>\",\"Content-Length\":\"29015\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:329311b3-01a1-4c99-b9d6-39adf826fa80>\",\"WARC-Concurrent-To\":\"<urn:uuid:8e244fc4-fbe1-4336-84ec-d0ecc8144517>\",\"WARC-IP-Address\":\"104.21.22.17\",\"WARC-Target-URI\":\"https://www.medcalc.org/manual/EIG-function.php\",\"WARC-Payload-Digest\":\"sha1:TNR2QP2WJOSYJJGBBVZ2KX46GL57IA66\",\"WARC-Block-Digest\":\"sha1:QNYJCGVJBOBSQTKBP2EOCJLIUJ42PH5X\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100529.8_warc_CC-MAIN-20231204115419-20231204145419-00050.warc.gz\"}"}