# Image Custom Matrix

Apply custom 2x2 transformation matrix to images. Input any four matrix values [a, b; c, d] to create unique transformations. Great for learning linear algebra and image processing.

> Canonical page: https://elysiatools.com/en/tools/image-custom-matrix

- **Category:** Media

- **Keywords:** image, custom, matrix, transform, linear, algebra, 2x2, affine, mathematics, education

## Overview

The Image Custom Matrix tool allows you to apply precise 2x2 linear transformations to your images by defining custom matrix values. By adjusting the four matrix coefficients, you can perform scaling, shearing, and rotation effects, making it an ideal utility for image processing experiments and educational demonstrations of linear algebra.

## Inputs

- **Image File** (file): Upload any image file (JPEG, PNG, WebP, GIF, BMP, TIFF) for custom matrix transformation
- **Matrix \[0,0\] (Top-Left)** (number): Top-left value of the 2×2 transformation matrix (affects X scaling and rotation)
- **Matrix \[0,1\] (Top-Right)** (number): Top-right value of the 2×2 transformation matrix (affects X shear and rotation)
- **Matrix \[1,0\] (Bottom-Left)** (number): Bottom-left value of the 2×2 transformation matrix (affects Y shear and rotation)
- **Matrix \[1,1\] (Bottom-Right)** (number): Bottom-right value of the 2×2 transformation matrix (affects Y scaling and rotation)
- **Background Color** (text): Background color for transparent areas (hex #RRGGBB or #RRGGBBAA, or color name)
- **Output Format** (select): Choose output format or keep original. PNG recommended for transparency
- **Quality (1-100)** (number): Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

## When to use

- When you need to perform specific geometric transformations like scaling or shearing on an image.
- When you are studying linear algebra and want to visualize how 2x2 matrices affect coordinate spaces.
- When you need to apply custom mathematical distortions to visual assets for creative or technical projects.

## How it works

- Upload your source image in any supported format like PNG, JPEG, or WebP.
- Input your desired values for the four matrix positions (m00, m01, m10, m11) to define the transformation.
- Optionally set a background color for transparent areas and choose your preferred output format and quality.
- Process the image to generate the transformed result based on your custom matrix parameters.

## Use cases

- Creating custom geometric distortions for artistic image effects.
- Demonstrating the impact of matrix multiplication on coordinate systems in a classroom setting.
- Batch-processing images with specific scaling or shearing requirements for technical layouts.

## Frequently asked questions

### What does the 2x2 matrix control?

The matrix values control linear transformations: m00 and m11 affect scaling, while m01 and m10 control shearing and rotation components.

### Can I use this for transparency?

Yes, you can set a background color or keep it transparent, and we recommend using PNG as the output format to preserve alpha channels.

### What image formats are supported?

You can upload JPEG, PNG, WebP, GIF, BMP, and TIFF files.

### How do I ensure high quality output?

For lossy formats like JPEG or WebP, you can adjust the quality slider up to 100 for the best visual fidelity.

### Is this tool suitable for educational purposes?

Absolutely, it is designed to help users visualize the practical application of linear algebra and matrix math on digital images.

## Related tools

- [Image Composite Matrix](https://elysiatools.com/en/tools/image-composite-matrix): Apply composite transformation by combining multiple basic transformations (scaling, rotation, shearing). See how transformation matrices multiply and create complex effects.
- [Image Shear](https://elysiatools.com/en/tools/image-shear): Apply shear transformation to create slanted or skewed images. Visualize shear matrices and see how they distort the image geometry.
- [Batch Image Convert](https://elysiatools.com/en/tools/batch-convert): Convert multiple images to different formats with quality settings and batch processing
- [Image Rotation Matrix](https://elysiatools.com/en/tools/image-rotation-matrix): Apply rotation transformation using rotation matrix mathematics. See the 2x2 rotation matrix in action and understand the trigonometric principles behind image rotation.
- [Image Scaling](https://elysiatools.com/en/tools/image-scaling): Apply scaling transformation to images with visual matrix representation. Supports uniform and non-uniform scaling with real-time preview.
- [Image Translation](https://elysiatools.com/en/tools/image-translation): Apply translation transformation to move images horizontally and vertically. Visualize the translation matrix and see how pixel coordinates shift.
- [Image Affine Transformation](https://elysiatools.com/en/tools/image-affine): Apply affine transformation for scaling, rotation, shearing, and translation
- [Image Boolean AND](https://elysiatools.com/en/tools/image-boolean-and): Apply bitwise AND operation between two images to create intersection mask

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing TypeScript Samples](https://elysiatools.com/en/samples/web-image-processing-typescript): Web TypeScript image processing examples including image read/save, scaling, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
