IMCONJUGATE function
PRO BASIC
The IMCONJUGATE function within Jspreadsheet Formulas Pro returns the complex conjugate of a given complex number. This means it changes the sign of the imaginary part while keeping the real part the same. This function is particularly useful in mathematical calculations involving complex numbers, where the complex conjugate often holds key information.
Documentation
The IMCONJUGATE function is used to return the complex conjugate of a complex number.
Category
Engineering
Syntax
IMCONJUGATE(inumber)
| Parameter | Description | 
|---|---|
inumber | 
The complex number for which to find the complex conjugate. | 
Behavior
The IMCONJUGATE function returns the complex conjugate of a complex number. The complex conjugate of a number is obtained by changing the sign of its imaginary component. The function takes the format IMCONJUGATE(complex_number), where complex_number is the complex number for which you want to find the complex conjugate.
- If 
complex_numberis a valid complex number,IMCONJUGATEwill return its complex conjugate. - If 
complex_numberis a real number,IMCONJUGATEwill return the same real number since the imaginary part is 0. - If 
complex_numberis a boolean value,IMCONJUGATEwill treat TRUE as 1 and FALSE as 0, and return the real number accordingly. - If 
complex_numberis a text string that cannot be interpreted as a complex number,IMCONJUGATEwill return a#VALUE!error. - If 
complex_numberis an empty cell,IMCONJUGATEwill return a#NUM!error. 
Common Errors
| Error | Description | 
|---|---|
#VALUE! | 
This error occurs when the complex_number argument is non-numeric or is a text string that cannot be interpreted as a complex number. | 
#NUM! | 
This error is displayed when the complex_number argument is an empty cell. | 
Best practices
- Always ensure that the
 complex_numberargument is a valid complex number or a real number.- Use the
 IMCONJUGATEfunction in combination with other complex number functions for calculations involving complex numbers.- Be mindful of the format in which you input the complex number. It should be in the form of "x+yi" or "x-yi", where x is the real part and y is the imaginary part of the complex number.
 - Handle errors effectively by using error checking functions like
 ISERRORorIFERRORin your formulas to prevent your spreadsheet from displaying error messages if something goes wrong.
Usage
A few examples using the IMCONJUGATE function.
IMCONJUGATE("3+4i") returns "3-4i"  
IMCONJUGATE("-2-5i") returns "-2+5i"  
IMCONJUGATE("0+8i") returns "-8i"  
IMCONJUGATE(A1) returns the complex conjugate of the value in cell A1  
Interactive Spreadsheet Demo
<html>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script>
<div id="spreadsheet"></div>
<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('M2JiYjc0ZjBmMjY5NjQ2YjNmZWU0YjY3OWZkYTZjZWNhM2Y1ZTUxYTE5OTk5OWI3NGFiMDYwMGEwYzI4YzlkZDQ2MTUyZThhZDZiNmZkOTM2MjJkZDNhNGRjYzQ3YmJiZGRjNTI4MmM5MzZjY2IzZGVmOTBlZjAxYjI0MTY3ODksZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJOREF5TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
// Create a new spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
  worksheets: [{
    data: [
    [
        "Complex Number",
        "Complex Conjugate"
    ],
    [
        "3+4i",
        "=IMCONJUGATE(A2)"
    ],
    [
        "-2-5i",
        "=IMCONJUGATE(A3)"
    ],
    [
        "0+8i",
        "=IMCONJUGATE(A4)"
    ],
    [
        "7-3i",
        "=IMCONJUGATE(A5)"
    ]
]
  }]
});
</script>
</html>
import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from "@jspreadsheet/formula-pro";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('M2JiYjc0ZjBmMjY5NjQ2YjNmZWU0YjY3OWZkYTZjZWNhM2Y1ZTUxYTE5OTk5OWI3NGFiMDYwMGEwYzI4YzlkZDQ2MTUyZThhZDZiNmZkOTM2MjJkZDNhNGRjYzQ3YmJiZGRjNTI4MmM5MzZjY2IzZGVmOTBlZjAxYjI0MTY3ODksZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJOREF5TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default function App() {
    // Spreadsheet array of worksheets
    const spreadsheet = useRef();
    // Worksheet data
    const data = [
    [
        "Complex Number",
        "Complex Conjugate"
    ],
    [
        "3+4i",
        "=IMCONJUGATE(A2)"
    ],
    [
        "-2-5i",
        "=IMCONJUGATE(A3)"
    ],
    [
        "0+8i",
        "=IMCONJUGATE(A4)"
    ],
    [
        "7-3i",
        "=IMCONJUGATE(A5)"
    ]
];
    // Render component
    return (
        <Spreadsheet ref={spreadsheet}>
            <Worksheet data={data} />
        </Spreadsheet>
    );
}
<template>
    <Spreadsheet ref="spreadsheet">
        <Worksheet :data="data" />
    </Spreadsheet>
</template>
<script>
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/vue";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
import formula from "@jspreadsheet/formula-pro";
// Set license
jspreadsheet.setLicense('M2JiYjc0ZjBmMjY5NjQ2YjNmZWU0YjY3OWZkYTZjZWNhM2Y1ZTUxYTE5OTk5OWI3NGFiMDYwMGEwYzI4YzlkZDQ2MTUyZThhZDZiNmZkOTM2MjJkZDNhNGRjYzQ3YmJiZGRjNTI4MmM5MzZjY2IzZGVmOTBlZjAxYjI0MTY3ODksZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJOREF5TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default {
    components: {
        Spreadsheet,
        Worksheet,
    },
    data() {
        // Worksheet data
        const data = [
    [
        "Complex Number",
        "Complex Conjugate"
    ],
    [
        "3+4i",
        "=IMCONJUGATE(A2)"
    ],
    [
        "-2-5i",
        "=IMCONJUGATE(A3)"
    ],
    [
        "0+8i",
        "=IMCONJUGATE(A4)"
    ],
    [
        "7-3i",
        "=IMCONJUGATE(A5)"
    ]
]
        return {
            data
        };
    }
}
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import * as formula from "@jspreadsheet/formula-pro";
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('M2JiYjc0ZjBmMjY5NjQ2YjNmZWU0YjY3OWZkYTZjZWNhM2Y1ZTUxYTE5OTk5OWI3NGFiMDYwMGEwYzI4YzlkZDQ2MTUyZThhZDZiNmZkOTM2MjJkZDNhNGRjYzQ3YmJiZGRjNTI4MmM5MzZjY2IzZGVmOTBlZjAxYjI0MTY3ODksZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpZeU16QTJOREF5TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2liRzlqWVd4b2IzTjBJbDBzSW5Cc1lXNGlPaUl6TkNJc0luTmpiM0JsSWpwYkluWTNJaXdpZGpnaUxDSjJPU0lzSW5ZeE1DSXNJbll4TVNJc0ltTm9ZWEowY3lJc0ltWnZjbTF6SWl3aVptOXliWFZzWVNJc0luQmhjbk5sY2lJc0luSmxibVJsY2lJc0ltTnZiVzFsYm5Seklpd2lhVzF3YjNKMFpYSWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0lzSW5CeWFXNTBJaXdpYzJobFpYUnpJaXdpWTJ4cFpXNTBJaXdpYzJWeWRtVnlJaXdpYzJoaGNHVnpJaXdpWm05eWJXRjBJbDBzSW1SbGJXOGlPblJ5ZFdWOQ==');
// Set the extensions
jspreadsheet.setExtensions({ formula });
@Component({
    standalone: true,
    selector: "app-root",
    template: `<div #spreadsheet></div>`
})
export class AppComponent {
    @ViewChild("spreadsheet") spreadsheet: ElementRef;
    // Worksheets
    worksheets: jspreadsheet.worksheetInstance[];
    // Create a new data grid
    ngAfterViewInit() {
        // Create spreadsheet
        this.worksheets = jspreadsheet(this.spreadsheet.nativeElement, {
            worksheets: [{
                data: [
    [
        "Complex Number",
        "Complex Conjugate"
    ],
    [
        "3+4i",
        "=IMCONJUGATE(A2)"
    ],
    [
        "-2-5i",
        "=IMCONJUGATE(A3)"
    ],
    [
        "0+8i",
        "=IMCONJUGATE(A4)"
    ],
    [
        "7-3i",
        "=IMCONJUGATE(A5)"
    ]
]
            }]
        });
    }
}